cleanup, some error handling

This commit is contained in:
2024-07-04 20:01:30 +02:00
parent b86d165c41
commit 79f69333a5
4 changed files with 15 additions and 11 deletions

View File

@ -37,7 +37,6 @@ typedef enum { // states -> 3 bit. valid transitions: (all could t
} State;
typedef struct {
uint16_t bms_timeout : 1;
uint16_t bms_fault : 1;
uint16_t temperature_error : 1;
@ -46,7 +45,8 @@ typedef struct {
uint16_t voltage_error : 1;
uint16_t voltage_missing : 1;
uint16_t state_transition_fail : 1;
uint16_t eeprom_error : 1;
uint16_t : 7; // padding
} ErrorKind;
//typedef enum {} WarningKind;
@ -59,8 +59,8 @@ typedef struct {
} StateHandle;
extern StateHandle state;
static bool relay_closed = 0;
static bool precharge_closed = 0;
static bool relay_closed = 0; //NOTE: unused?
static bool precharge_closed = 0; //NOTE: unused?
extern int16_t RELAY_BAT_SIDE_VOLTAGE;
extern int16_t RELAY_ESC_SIDE_VOLTAGE;
extern int16_t CURRENT_MEASUREMENT;