Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Within the state machines used in this system, there exist transitions that depend on the current states of other state machines. However, since the current FSM API does not provide a way to view the current state outside of string comparisons, a wrapper struct will be used to hold both the FSMs as well as their current states. In addition, the code defining each FSM has been split up, which will make it easier to add new FSMs in the future if needed. As of now, the driver input system is controlled by four FSMs.

Power State Machine:

Keeps track of the car's functional state.

StateDescriptionTransition
OffThe vehicle is off
  • Receiver POWER signal while in brake and neutral.
OnThe vehicle is on
  • Receiver POWER signal while in the off state.


Pedal State Machine:

This state machine governs the running state of the car and defines the conditions under which the driver can turn on and move the vehicle. Transitions for this FSM depend on the state of the directional state machine.

...