Adaptive Brake Lights

Summary

The adaptive brakelight controller allows to have brake lights that flash during very hard braking, as found on many modern cars.

It waits for the 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
Usage type Multiple (Not useful)

JBeam Properties

string
type
brakelights
default
The output electrics name, to be used as the source for the brakelights.
bool
type
true
default
Whether to display ESC actions with active brake lights.
bool
type
true
default
Automatically turns on the hazards when coming to an emergency stop.
number
type
10
default
The minimum speed (m/s) the vehicle has to travel at for the hazard function to be armed.
number
type
3
default
The speed (m/s) at which the hazard actually comes on when braking.
number
type
0.3
default
Hazards are automatically deactivated again if the throttle input is above the deactivate throttle value and the vehicle speed exceeds the deactivate speed.
number
type
3
default
Hazards are automatically deactivated again if the vehicle speed exceeds this speed (m/s) and the thottle value is above the deactivate throttle.
number
type
0.1
default
Time (s) the lights are on while flashing.
number
type
0.1
default
Time (s) the lights are off while flashing.


Example Usage

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

Last modified: December 18, 2021

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.