Adaptive Brake Lights

Summary

The adaptive brakelight controller allows for having modern looking flashing brakelights when doing an emergency stop. It is based around when ABS starts to affect the braking and then starts to flash the lights. Additionally, it can also show when the ESC intervenes via the brakelights.

File Info

Filename adaptiveBrakeLights.lua
Path /lua/vehicle/controller/adaptiveBrakeLights.lua
Type Auxiliary
Multiple Usage Possible / Not useful

Jbeam Properties

Name Default Unit Description
electricsName brakelights string The output electrics name, to be used as the source for the brakelights
indicateESCUsageWithBrakelights true bool Whether to display ESC actions with active brake lights
activateHazardsAfterEmergencyBraking true bool Automatically turns on the hazards when coming to an emergency stop
hazardArmSpeed 10 m/s The minimum speed the vehicle has to travel at for the hazard function to be armed
hazardActivateSpeed 3 m/s The speed at which the hazard actually comes on when braking
hazardDeactivateThrottle 0.3 number Hazards are automatically deactivated again if the throttle input is above the deactivate throttle value and the vehicle speed exceeds the deactivate speed
hazardDeactivateSpeed 3 m/s Hazards are automatically deactivated again if the throttle input is above the deactivate throttle value and the vehicle speed exceeds the deactivate speed
blinkOnTime 0.1 s Time the lights are on while flashing
blinkOffTime 0.1 s Time the lights are off while flashing

Example Usage

"controller": [
  ["fileName"],
  ["adaptiveBrakeLights"]
],
"adaptiveBrakeLights": {
  "indicateESCUsageWithBrakelights":false,
  "activateHazardsAfterEmergencyBraking":false,
  "blinkOnTime": 0.25,
  "blinkOnffTime": 0.05,
}