clean up
This commit is contained in:
@ -26,7 +26,7 @@ typedef enum { // 7 states -> 3 bit. valid transitions: (all could transition
|
||||
STATE_ERROR, // ERROR -> INACTIVE, DISCHARGE, ERROR
|
||||
} State;
|
||||
|
||||
typedef struct { // 13 errors -> 4 bit
|
||||
typedef struct {
|
||||
uint16_t bms_timeout : 1;
|
||||
uint16_t bms_checksum_fail : 1;
|
||||
uint16_t bms_overtemp : 1;
|
||||
@ -58,7 +58,6 @@ extern StateHandle state;
|
||||
|
||||
void sm_init();
|
||||
void sm_update();
|
||||
int sm_get_state_code();
|
||||
|
||||
State sm_update_inactive();
|
||||
State sm_update_precharge();
|
||||
@ -71,7 +70,7 @@ State sm_update_error();
|
||||
typedef enum { RELAY_MAIN, RELAY_PRECHARGE } Relay;
|
||||
void sm_set_relay_positions(State state);
|
||||
void sm_set_relay(Relay relay, bool closed);
|
||||
void sm_check_precharge_discharge(int *is_closed, int should_close);
|
||||
void sm_check_precharge_discharge(bool *is_closed, bool should_close);
|
||||
|
||||
void sm_check_errors();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user