Skip to main content
Firmware 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
ValueMode nameDescription
0MODE_STOPDriver or common block error detected. Verify `/driver/error` and `/common/error`
2MODE_INVALID_INPUTSInvalid controller GPIO readings. Verify `/common/stat`
6MODE_BMS_ERRORBMS communication timeout detected
9MODE_IDENTMotor identification in progress
10MODE_INITLYNX initialization (duration: `/best/reset_time`)
20MODE_CAN_TIMEOUT200ms timeout on CAN 0x5FF - Control input message
30MODE_WELDINGController operating as stick welder FW _VECTOR_LYNX_welding_ only
65MODE_CHARGE_EXT_FOREVERBMS indicates charging. Riding disabled until next power cycle
68MODE_CHARGE_EXTBMS indicates charging. Riding enabled when charging completes
70MODE_CHARGEController functioning as step-up converter for battery charging. (Requires special hardware)
79MODE_SLAVEDevice operating under Master controller in multi-controller configuration
80MODE_OVRDriver override via Driver API or terminal
90MODE_LOCKDevice locked
95MODE_SEAT_SWITCHSeat switch activated
100MODE_STANDBYNo blocking condition, motor freewheeling. Not the same as armed: check `/disarm_reason`.
101MODE_BRAKEBraking active
102MODE_ACCELERATEAccelerator-induced acceleration active
104MODE_KICKBACKKickback assist active
105MODE_ASSISTPAS acceleration active
110MODE_CRUISECruise control active
120MODE_DISARMED_FOREVERLYNX permanently disarmed - accelerator input disabled