Control Management Unit (CMU)
The central hub for advanced driving dynamics. The CMU orchestrates all sensors, actuators, and supervisors that make up the vehicle's electronic stability and traction management systems. It initializes sub-controllers, manages calibration routines, and provides debug output via UDP.
The central hub for advanced driving dynamics. The CMU orchestrates all sensors, actuators, and supervisors that make up the vehicle's electronic stability and traction management systems. It initializes sub-controllers, manages calibration routines, and provides debug output via UDP.
State Fields
| Field | Type | Description |
|---|---|---|
sensorHub, vehicleData, virtualSensors | table | References to the primary data structures containing physical and calculated vehicle state. |
warningLightPulse | number | Oscillating value used for pulsing dashboard warning lights. |
Public API
| Function | Description |
|---|---|
new(jbeamData) | Initializes the CMU and its sub-controllers (sensors and supervisors). |
registerCalibrationCallback(callback, callbackType) | Allows external modules to hook into the CMU's update loops during calibration. |
disableSystemsForCalibration() | Temporarily disables all driving dynamics supervisors (TCS, ESC, etc.). |
getSupervisors() | Returns a list of all active driving dynamics supervisor modules. |
module.getSensor(sensorName) | Returns the sensor. |
module.getSensors() | Returns the sensors. |
module.getActuator(actuatorName) | Returns the actuator. |
module.getActuators() | Returns the actuators. |
module.setDebugMode(debugEnabled) | Sets the debug mode. |
module.setParameters(parameters) | Sets the parameters. |
module.setConfig(configTable) | Sets the config. |
module.getConfig() | Returns the config. |
Hooks
| Hook | Description |
|---|---|
updateGFX(dt) | Manages UDP debug heartbeats and updates warning light oscillations. |
module.init(jbeamData) | Initializes the controller from JBeam data. |
module.initSecondStage() | Second-stage initialization after all controllers are loaded. |
module.reset(jbeamData) | Resets the controller to its initial state. |
module.initLastStage() | Final-stage initialization after all controllers and powertrains are ready. |
Usage Example
-- Access CMU sensors
local cmu = controller.getController("CMU")
local sensors = cmu.getSensors()
-- Get a specific sensor
local sensorHub = cmu.getSensor("sensorHub")
-- Disable dynamics systems for calibration
cmu.disableSystemsForCalibration()See Also
- Sensor Hub — Central sensor data aggregation
- Vehicle Data — Processed vehicle state
- Traction Control — TCS supervisor
- Yaw Control — ESC/yaw supervisor
Kingpin Coupling
Controls the kingpin assembly on the trailer side of a fifth-wheel coupling. Manages the coupling interface that mates with the tractor's fifth wheel plate.
Active Center Differential Lock
Electronically controlled center differential lock actuator. Varies the lock percentage of the center differential based on commands from the driving dynamics supervisors, controlling front-to-rear torque distribution.