Skip to content

Commit

Permalink
Merge branch 'maint/update-readme' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
vertexmachina committed Sep 19, 2017
2 parents f2f6cdb + 1d1ec84 commit eeda93c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ These methods are the start and end points of using the OSCC API in your applica
on the specified CAN channel, enabling it to quickly receive reports from and send commands to the firmware modules.
When you are ready to terminate your application, ```oscc_close``` can terminate the connection.
**NOTE:**
> The OSCC API catches the SIGIO signal which is asserted when a CAN frame is received on the CAN socket, and sets up a SIGIO signal handler
> to forward valid CAN messages to your application. If you have a section of code that is susceptible to conflicts with interrupts,
> you should temporarily block the SIGIO signal for the duration of that section and unblock it afterward.
**Enable and disable all OSCC modules.**
```c
Expand All @@ -234,9 +239,14 @@ oscc_result_t publish_steering_torque( double normalized_torque );
oscc_result_t publish_throttle_position( double normalized_position );
```
These commands will forward a double value, *[0.0, 1.0]*, to the specified firmware module. The API will construct the appropriate values
to send spoof commands into the vehicle ECU's to achieve the desired state. The API also contains safety checks to ensure no invalid values
can be written onto the hardware.
These commands will forward a double value to the specified firmware module. The double values are [0.0, 1.0] for brake and throttle,
and [-1.0, 1.0] for steering where -1.0 is counterclockwise and 1.0 is clockwise. The API will construct the appropriate values to send
as spoofed voltages to the vehicle to achieve the desired state. The API also contains safety checks to ensure no voltages outside of
the vehicle's expected range are sent.
**NOTE:**
> Each of these functions must be called at least once every 200ms to prevent the modules from detecting a loss of communication to the
> controlling computer (at which point they would disable themselves).
**Register callback function to handle OSCC report and OBD messages.**
Expand Down

0 comments on commit eeda93c

Please sign in to comment.