...
Code Block | ||
---|---|---|
| ||
id: data: state (off, drive, reverse, cruise): |
Also takes CAN messages from pedal board to determine motor current percent (torque). This only happend when MCI is in the drive/reverse state
MCI status messages, groups by motor controller:
...
FSM starts in the off state
off → drive, reverse
drive → cruise (only when speed is within a CRUISE_SPEED_MIN and CRUISE_SPEED_MAX), off, reverse (only when speed is 0)
cruise → off, drive
reverse → off, drive (only when speed is 0)