State Machine
The system always exists in one of the predefined states, also known as modes. These modes are represented internally as numeric state variables.
You can access the current mode through the /mode
variable located at the root level.
Mode Name | Mode Number | Description |
---|---|---|
MODE_STOP | 0 | Controller is in an error state. Either /driver/error or /common/error is non-zero. |
MODE_IDLE | 100 | Controller is idle.Throttle is at zero. |
MODE_ACC | 110 | Controller is accelerating. Throttle is above zero. |
MODE_REVERSE | 115 | Controller is reversing. |
MODE_BRAKE | 120 | Controller is braking. |
MODE_OVERRIDEN | 200 | Driver is overridden via CAN or the run command. |