State Machine
The system always operates within one of the defined states, also known as modes, represented internally as numerical values. The state machine implements priority-based ordering — lower numbers indicate higher priority. This ensures deterministic behavior in all situations.
Mode Descriptions
Modes represent the operational states of the FALCON application, determined by the state machine. These modes aid in debugging by indicating the controller's current status.
The mode value is accessible via the /mode state variable and is broadcast periodically over CAN in the 0x600 - FALCON status message.
/mode
| Value | Mode name | Description |
|---|---|---|
| 0 | MODE_STOP | Driver or common block error detected. Verify /driver/error and /common/error. |
| 10 | MODE_NOCONFIG | Parameter configured is 0 or -1. Set configured to 1 to proceed. |
| 90 | MODE_INVALID_SIGNAL | sig_throttle is NaN. Input signal is out of range or invalid. |
| 94 | MODE_FREEWHEEL | Freewheel mode engaged via CAN control message (control_mode = 0). |
| 95 | MODE_ESTOP | Emergency stop is activated. |
| 96 | MODE_DOCKING | Prop docking in progress. Motor is homing toward the dock position. |
| 97 | MODE_DOCKED | Prop is docked. Motor is held in short-circuit brake at the dock position. |
| 100 | MODE_IDLE | Controller is idle. Throttle command is at zero. |
| 110 | MODE_ACC | Controller is accelerating. Throttle command is positive. |
| 115 | MODE_REVERSE | Controller is reversing. Throttle command is negative. |
| 120 | MODE_BRAKE | Controller is braking (combined brake and reverse mode). |
| 200 | MODE_OVERRIDEN | Driver is overridden via Driver API or the run command. |