Skip to main content
FW version: Stable

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 (e.g., simultaneous accelerator and brake activation).

LYNX Mode Descriptions

Modes represent the operational states of the LYNX 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 variable in the root directory and is broadcast periodically over CAN in the 0x600 - LYNX status message.

Mode NameMode ValueDescription
MODE_STOP0Driver or common block error detected
Verify /driver/error and /common/error
MODE_INVALID_INPUTS2Invalid controller GPIO readings
Verify /common/state
MODE_BMS_ERROR6BMS communication timeout detected
MODE_IDENT9Motor identification in progress
MODE_INIT10LYNX initialization (duration: /best/reset_time)
MODE_CAN_TIMEOUT20200ms timeout on CAN 0x5FF - Control input message
MODE_WELDING30Controller operating as stick welder (FW VECTOR_LYNX_welding only)
MODE_CHARGE_EXT_FOREVER65BMS indicates charging
Riding disabled until next power cycle
MODE_CHARGE_EXT68BMS indicates charging
Riding enabled when charging completes
MODE_CHARGE70Controller functioning as step-up converter for battery charging
(Requires special hardware)
MODE_SLAVE79Device operating under Master controller in multi-controller configuration
MODE_OVR80Driver override via Driver API or terminal
MODE_LOCK90Device locked
MODE_SEAT_SWITCH95Seat switch activated
MODE_STANDBY100Device ready, motor freewheeling, no inputs active
MODE_BRAKE101Braking active
MODE_ACCELERATE102Accelerator-induced acceleration active
MODE_KICKBACK104Kickback assist active
MODE_ASSIST105PAS acceleration active
MODE_CRUISE110Cruise control active
MODE_DISARMED_FOREVER120LYNX permanently disarmed - accelerator input disabled