Electrics refer to all the information that is created by the vehicle’s systems for use by other systems and the jbeam itself, notably for things like hydros
and props
.
It includes mostly information about the vehicle’s status, things like the speed, the status of lights, engine information, etc. You can think of it as the network of sensors and switches that are connected to the car’s ECU.
You can see the current state of a vehicle’s electrics by choosing the current vehicle in the console and entering “dump(electrics)”
As electrics can have multiple sources, there is no definitive list of all the electrics. The main ones are available here, along with the vehicle controller
page.
Most electrics are defined in base SI units, and will often need to be converted when using them for gauges and displays.
Electrics
These are the electrics which are managed by vehicleLua and not tied to specific controllers or drivetrain elements.
Vehicle controls
Description
Indicates the horn is active.
Description
Parking brake input
Description
Parking brake input
Description
Indicates a reverse gear is selected.
Description
Angle of the steering wheel.
Description
Steering input percentage.
Description
Throttle input percentage.
Lights
Description
Combines the brake electrics with the signal_R electric. Lights up if either of those are on. Used for american style indicator/lights.
Description
Combines the brake electrics with the signal_L electric. Lights up if either of those are on. Used for american style indicator/lights.
Description
Indicates the foglights are turned on.
Description
Flashing function when hazards are on.
Description
Indicates the hazards have been turned on
Description
Tells if the high beams are turned on.
Description
Indicates the current lightbar mode
Description
index of the current light mode (0 is off, 1 is lowbeams, 2 is highbeams)
Description
index of the current light mode (0 is off, 1 is lowbeams, 2 is highbeams)
Description
Tells if the low beams are turned on.
Description
Tells if either the low or high beams are turned on.
Name
lowhighbeam_signal_R
Description
Combines the lowhighbeam electrics with the signal_R electric. Lights up if either of those are on. Used for american style indicator/lights.
Name
lowhighbeam_signal_L
Description
Combines the lowhighbeam electrics with the signal_L electric. Lights up if either of those are on. Used for american style indicator/lights.
Description
Currently unused
Description
Indicates a reverse gear is selected.
Description
Flashes if the left turn signal or hazards are turned on.
Description
Flashes if the right turn signal or hazards are turned on.
Description
Indicates the left indicator is selected.
Description
Indicates the right indicator is selected.
Description
Varies depending on which turn signal is selected (right is 1, left is -1)
Vehicle status
Units/Values
m/s (meters per second)
Description
Speed of the vehicle compared to the world.
Units/Values
m/s (meters per second)
Description
Speed of the vehicle compared to the airflow, taking into account wind.
Description
Altitude of the vehicle
Description
Indicates a tire is deflated
Description
Indicates the oil temperature is greater than 130°C
Description
Smoothed engine speed value for use with tachometers
Description
Spin function based on engine RPM. Used for spinning pulley props.
Units/Values
m/s (meters per second)
Description
Speed of the car measured at the wheels.