update uint8_t to bool

This commit is contained in:
lenvm 2023-11-14 21:46:15 +01:00
parent ce08e00a5d
commit e2cac8f77d
8 changed files with 11 additions and 11 deletions

View file

@ -106,8 +106,8 @@ unsigned long prechargeStartTime = 0;
unsigned long negativeStartTime = 0; unsigned long negativeStartTime = 0;
unsigned long timeSpentInFaultedMode = 0; unsigned long timeSpentInFaultedMode = 0;
#endif #endif
uint8_t batteryAllowsContactorClosing = false; bool batteryAllowsContactorClosing = false;
uint8_t inverterAllowsContactorClosing = true; bool inverterAllowsContactorClosing = true;
// Initialization // Initialization
void setup() { void setup() {

View file

@ -23,7 +23,7 @@ extern uint16_t stat_batt_power;
extern uint16_t temperature_min; extern uint16_t temperature_min;
extern uint16_t temperature_max; extern uint16_t temperature_max;
extern uint16_t CANerror; extern uint16_t CANerror;
extern uint8_t batteryAllowsContactorClosing; extern bool batteryAllowsContactorClosing;
// Definitions for BMS status // Definitions for BMS status
#define STANDBY 0 #define STANDBY 0
#define INACTIVE 1 #define INACTIVE 1

View file

@ -25,7 +25,7 @@ extern uint16_t temperature_max;
extern uint16_t CANerror; extern uint16_t CANerror;
extern uint16_t cell_max_voltage; extern uint16_t cell_max_voltage;
extern uint16_t cell_min_voltage; extern uint16_t cell_min_voltage;
extern uint8_t batteryAllowsContactorClosing; extern bool batteryAllowsContactorClosing;
extern uint8_t LEDcolor; extern uint8_t LEDcolor;
// Definitions for BMS status // Definitions for BMS status
#define STANDBY 0 #define STANDBY 0

View file

@ -23,7 +23,7 @@ extern uint16_t stat_batt_power;
extern uint16_t temperature_min; extern uint16_t temperature_min;
extern uint16_t temperature_max; extern uint16_t temperature_max;
extern uint16_t CANerror; extern uint16_t CANerror;
extern uint8_t batteryAllowsContactorClosing; extern bool batteryAllowsContactorClosing;
// Definitions for BMS status // Definitions for BMS status
#define STANDBY 0 #define STANDBY 0
#define INACTIVE 1 #define INACTIVE 1

View file

@ -24,8 +24,8 @@ extern uint16_t temperature_min; //C+1, Goes thru convert2unsignedint16 funct
extern uint16_t temperature_max; //C+1, Goes thru convert2unsignedint16 function (15.0C = 150, -15.0C = 65385) extern uint16_t temperature_max; //C+1, Goes thru convert2unsignedint16 function (15.0C = 150, -15.0C = 65385)
extern uint16_t cell_max_voltage; //mV, 0-4350 extern uint16_t cell_max_voltage; //mV, 0-4350
extern uint16_t cell_min_voltage; //mV, 0-4350 extern uint16_t cell_min_voltage; //mV, 0-4350
extern uint8_t batteryAllowsContactorClosing; //Bool, 1=true, 0=false extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern uint8_t LEDcolor; //Enum, 0-2 extern uint8_t LEDcolor; //Enum, 0-2
// Definitions for bms_status // Definitions for bms_status
#define STANDBY 0 #define STANDBY 0
#define INACTIVE 1 #define INACTIVE 1

View file

@ -71,7 +71,7 @@ static uint8_t packContactorSetState = 0;
static uint8_t packCtrsClosingAllowed = 0; static uint8_t packCtrsClosingAllowed = 0;
static uint8_t pyroTestInProgress = 0; static uint8_t pyroTestInProgress = 0;
static uint8_t send221still = 10; static uint8_t send221still = 10;
static uint8_t LFP_Chemistry = false; static bool LFP_Chemistry = false;
//Fault codes //Fault codes
static uint8_t WatchdogReset = 0; //Warns if the processor has experienced a reset due to watchdog reset. static uint8_t WatchdogReset = 0; //Warns if the processor has experienced a reset due to watchdog reset.
static uint8_t PowerLossReset = 0; //Warns if the processor has experienced a reset due to power loss. static uint8_t PowerLossReset = 0; //Warns if the processor has experienced a reset due to power loss.

View file

@ -20,8 +20,8 @@ extern uint16_t temperature_min; //C+1, Goes thru convert2unsignedint16 funct
extern uint16_t temperature_max; //C+1, Goes thru convert2unsignedint16 function (15.0C = 150, -15.0C = 65385) extern uint16_t temperature_max; //C+1, Goes thru convert2unsignedint16 function (15.0C = 150, -15.0C = 65385)
extern uint16_t cell_max_voltage; //mV, 0-4350 extern uint16_t cell_max_voltage; //mV, 0-4350
extern uint16_t cell_min_voltage; //mV, 0-4350 extern uint16_t cell_min_voltage; //mV, 0-4350
extern uint8_t batteryAllowsContactorClosing; //Bool, 1=true, 0=false extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern uint8_t LEDcolor; //Enum, 0-2 extern uint8_t LEDcolor; //Enum, 0-2
extern uint16_t min_voltage; extern uint16_t min_voltage;
extern uint16_t max_voltage; extern uint16_t max_voltage;
// Definitions for BMS status // Definitions for BMS status

View file

@ -26,7 +26,7 @@ extern uint16_t min_voltage;
extern uint16_t max_voltage; extern uint16_t max_voltage;
extern uint16_t cell_max_voltage; extern uint16_t cell_max_voltage;
extern uint16_t cell_min_voltage; extern uint16_t cell_min_voltage;
extern uint8_t inverterAllowsContactorClosing; extern bool inverterAllowsContactorClosing;
// Timeout in milliseconds // Timeout in milliseconds
#define SolaxTimeout 2000 #define SolaxTimeout 2000