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. Or /common/stat = 1. |
| MODE_NOCONFIG | 10 | Parameter configured = 0. This is the initial state before configuration, set configured to 1 to proceed. |
| MODE_INVALID_SIGNAL | 90 | sig_throttle is NaN. This mean, that input signal is out of range or invalid. |
| MODE_ESTOP | 95 | Emergency stop is activated. |
| 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. |