![]() |
Midnight Sun Firmware
|
Controls drive state for neutral, drive, and reverse. More...
Enumerations | |
enum | DriveState { DRIVE_STATE_INVALID = 0 , DRIVE_STATE_NEUTRAL , DRIVE_STATE_DRIVE , DRIVE_STATE_REVERSE , VEHICLE_NEUTRAL , VEHICLE_DRIVE , VEHICLE_REVERSE , VEHICLE_CRUISE , VEHICLE_BRAKE } |
Drive states representing the current output. More... | |
enum | DriveStateRequest { DRIVE_STATE_REQUEST_NONE = 0 , DRIVE_STATE_REQUEST_D , DRIVE_STATE_REQUEST_N , DRIVE_STATE_REQUEST_R } |
Requests made to control the drive state. More... | |
Functions | |
void | drive_state_manager_init (void) |
Initialize the drive state manager. | |
void | drive_state_manager_request (DriveStateRequest req) |
Make a request to change the drive state. More... | |
void | drive_state_manager_update (void) |
Update the drive state based on the current request. | |
DriveState | drive_state_manager_get_state (void) |
Get the current state of the drive controller. More... | |
Controls drive state for neutral, drive, and reverse.
enum DriveState |
Drive states representing the current output.
enum DriveStateRequest |
DriveState drive_state_manager_get_state | ( | void | ) |
Get the current state of the drive controller.
void drive_state_manager_request | ( | DriveStateRequest | req | ) |
Make a request to change the drive state.
req | The requested drive state |