Skip to content

Commit

Permalink
update uint8_t to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
lenvm committed Nov 14, 2023
1 parent ce08e00 commit e2cac8f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Software/Software.ino
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ unsigned long prechargeStartTime = 0;
unsigned long negativeStartTime = 0;
unsigned long timeSpentInFaultedMode = 0;
#endif
uint8_t batteryAllowsContactorClosing = false;
uint8_t inverterAllowsContactorClosing = true;
bool batteryAllowsContactorClosing = false;
bool inverterAllowsContactorClosing = true;

// Initialization
void setup() {
Expand Down
2 changes: 1 addition & 1 deletion Software/src/battery/BMW-I3-BATTERY.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern uint16_t stat_batt_power;
extern uint16_t temperature_min;
extern uint16_t temperature_max;
extern uint16_t CANerror;
extern uint8_t batteryAllowsContactorClosing;
extern bool batteryAllowsContactorClosing;
// Definitions for BMS status
#define STANDBY 0
#define INACTIVE 1
Expand Down
2 changes: 1 addition & 1 deletion Software/src/battery/IMIEV-CZERO-ION-BATTERY.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern uint16_t temperature_max;
extern uint16_t CANerror;
extern uint16_t cell_max_voltage;
extern uint16_t cell_min_voltage;
extern uint8_t batteryAllowsContactorClosing;
extern bool batteryAllowsContactorClosing;
extern uint8_t LEDcolor;
// Definitions for BMS status
#define STANDBY 0
Expand Down
2 changes: 1 addition & 1 deletion Software/src/battery/KIA-HYUNDAI-64-BATTERY.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern uint16_t stat_batt_power;
extern uint16_t temperature_min;
extern uint16_t temperature_max;
extern uint16_t CANerror;
extern uint8_t batteryAllowsContactorClosing;
extern bool batteryAllowsContactorClosing;
// Definitions for BMS status
#define STANDBY 0
#define INACTIVE 1
Expand Down
4 changes: 2 additions & 2 deletions Software/src/battery/NISSAN-LEAF-BATTERY.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 cell_max_voltage; //mV, 0-4350
extern uint16_t cell_min_voltage; //mV, 0-4350
extern uint8_t batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern uint8_t LEDcolor; //Enum, 0-2
extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern uint8_t LEDcolor; //Enum, 0-2
// Definitions for bms_status
#define STANDBY 0
#define INACTIVE 1
Expand Down
2 changes: 1 addition & 1 deletion Software/src/battery/TESLA-MODEL-3-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static uint8_t packContactorSetState = 0;
static uint8_t packCtrsClosingAllowed = 0;
static uint8_t pyroTestInProgress = 0;
static uint8_t send221still = 10;
static uint8_t LFP_Chemistry = false;
static bool LFP_Chemistry = false;
//Fault codes
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.
Expand Down
4 changes: 2 additions & 2 deletions Software/src/inverter/SOFAR-CAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 cell_max_voltage; //mV, 0-4350
extern uint16_t cell_min_voltage; //mV, 0-4350
extern uint8_t batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern uint8_t LEDcolor; //Enum, 0-2
extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false
extern uint8_t LEDcolor; //Enum, 0-2
extern uint16_t min_voltage;
extern uint16_t max_voltage;
// Definitions for BMS status
Expand Down
2 changes: 1 addition & 1 deletion Software/src/inverter/SOLAX-CAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern uint16_t min_voltage;
extern uint16_t max_voltage;
extern uint16_t cell_max_voltage;
extern uint16_t cell_min_voltage;
extern uint8_t inverterAllowsContactorClosing;
extern bool inverterAllowsContactorClosing;

// Timeout in milliseconds
#define SolaxTimeout 2000
Expand Down

0 comments on commit e2cac8f

Please sign in to comment.