Skip to content

Commit

Permalink
Merge branch 'maint/update-steering-override' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
vertexmachina committed Sep 21, 2017
2 parents 37248da + a2b8c2c commit ea8e2c5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,17 @@ firmware for the Kia Soul:
cmake .. -DKIA_SOUL=ON
```

**Operator Overrides: While all OSCC modules have operator override detection enabled by default, attempting to grab the steering wheel while the system is active could result in serious injury. The preferred method of operator override for steering is to utilize the brake pedal or E-stop button. To disable operator override for the steering module, pass an additional flag to the CMake build step.**

```
cmake .. -DKIA_SOUL=ON -DSTEERING_OVERRIDE=OFF
```

If steering operator overrides remain enabled, the sensitivity can be adjusted by changing the value of the `TORQUE_DIFFERENCE_OVERRIDE_THRESHOLD` in the corresponding vehicle's header file.

* Lowering this value will make the steering module more sensitive to operator override, but will result in false positives around high-torque areas, such as the mechanical limits of the steering rack or when quickly and rapidly changing direction.
* Increasing this value will result in fewer false positives, but will make it more difficult to manually override the wheel.

By default, your firmware will have debug symbols which is good for debugging but increases
the size of the firmware significantly. To compile without debug symbols and optimizations
enabled, use the following instead:
Expand Down
6 changes: 6 additions & 0 deletions firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ else()
option(KIA_SOUL "Build firmware for the petrol Kia Soul" OFF)
option(KIA_SOUL_EV "Build firmware for the Kia Soul EV" OFF)
option(BRAKE_STARTUP_TEST "Enable brake startup sensor tests" ON)
option(STEERING_OVERRIDE "Enable steering override" ON)

set(SERIAL_PORT_BRAKE "/dev/ttyACM0" CACHE STRING "Serial port of the brake module")
set(SERIAL_BAUD_BRAKE "115200" CACHE STRING "Serial baud rate of the brake module")
Expand Down Expand Up @@ -92,6 +93,11 @@ else()
message(WARNING "Brake sensor startup tests disabled")
endif()

if(STEERING_OVERRIDE)
add_definitions(-DSTEERING_OVERRIDE)
message(WARNING "Steering override is enabled. This is an experimental feature! Attempting to grab the steering wheel while the system is active could result in serious injury. The preferred method of operator override for steering is to utilize the brake pedal or E-stop button.")
endif()

add_subdirectory(brake)
add_subdirectory(can_gateway)
add_subdirectory(steering)
Expand Down
2 changes: 2 additions & 0 deletions firmware/steering/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ int main( void )
{
check_for_incoming_message( );

#ifdef STEERING_OVERRIDE
check_for_operator_override( );
#endif
}
}

0 comments on commit ea8e2c5

Please sign in to comment.