Skip to main content
FW version: Stable

State machine

The system is always persisting in one of its allowed states. These states are also called modes and are visible as a state variable inside the system as a number. An important fact about the state machine is that it gives the order to all the modes - the lower the number is, the higher the priority is. This will ensure that the behavior is always defined (i.e., throttle and brake applied simultaneously).

LYNX modes description

The mode is a state of the LYNX application. It is the output of the state machine. The mode is useful for the user to know what is the controller doing during debugging.

The mode is variable /mode in the root. Also it is sent periodically over CAN in message 0x600 - LYNX status.

MODE nameMODE numberDescription
MODE_STOP0Driver or common block is in error.
Check /driver/error and /common/error.
MODE_INVALID_INPUTS2Controler GPIO reading is not valid.
Check /common/state.
MODE_BMS_ERROR6There is timeout for communication with the BMS.
MODE_IDENT9Motor identification is in process.
MODE_INIT10LYNX is initializing. This equals to /best/reset_time
MODE_CAN_TIMEOUT20Timeout for CAN 0x5FF - Controll input message (if used). Timeout is 200ms
MODE_WELDING30Controller is used as stick welder. Only in FW VECTOR_LYNX_welding.
MODE_CHARGE_EXT_FOREVER65BMS reports charging.
Ride is disabled until next powercycle.
MODE_CHARGE_EXT68BMS report charging.
Ride will be allowed after the BMS stop reporting charging.
MODE_CHARGE70Controller act as step-up converter and charging battery.
(Not present in standard HW)
MODE_SLAVE79Device is under the control from the Master controller - Multi controller setup.
MODE_OVR80Driver is overriden by Driver API or using term.
MODE_LOCK90Device is locked
MODE_SEAT_SWITCH95Seat switch is activated.
MODE_STANDBY100Device is ready, motor is freewheeling, no throttle, brake, etc.
MODE_BRAKE101Device is braking
MODE_ACCELERATE102Device is accelerating from the throttle
MODE_KICKBACK104Kickback assist active
MODE_ASSIST105Device is accelerating from PAS
MODE_CRUISE110Device is accelerating due to cruise function
MODE_DISARMED_FOREVER120LYNX disarmed forever - throttle input is disabled