diff --git a/Software/Software.ino b/Software/Software.ino index e02a1979..71bc3c5f 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -73,6 +73,7 @@ uint16_t bms_status = ACTIVE; // ACTIVE - [0..5]<>[STANDBY,INACTIVE,DARKSTA uint16_t stat_batt_power = 0; // Power going in/out of battery uint16_t cell_max_voltage = 3700; // Stores the highest cell voltage value in the system uint16_t cell_min_voltage = 3700; // Stores the minimum cell voltage value in the system +bool LFP_Chemistry = false; // LED parameters Adafruit_NeoPixel pixels(1, WS2812_PIN, NEO_GRB + NEO_KHZ800); diff --git a/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp index 28e5a72f..adf49784 100644 --- a/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp @@ -70,7 +70,6 @@ static uint8_t packContactorSetState = 0; static uint8_t packCtrsClosingAllowed = 0; static uint8_t pyroTestInProgress = 0; static uint8_t send221still = 10; -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. diff --git a/Software/src/battery/TESLA-MODEL-3-BATTERY.h b/Software/src/battery/TESLA-MODEL-3-BATTERY.h index 2775b56c..411429cc 100644 --- a/Software/src/battery/TESLA-MODEL-3-BATTERY.h +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.h @@ -30,6 +30,7 @@ extern uint16_t CANerror; extern uint16_t cell_max_voltage; extern uint16_t cell_min_voltage; extern uint8_t LEDcolor; +extern bool LFP_Chemistry; // Definitions for BMS status #define STANDBY 0 #define INACTIVE 1 diff --git a/Software/src/inverter/BYD-MODBUS.cpp b/Software/src/inverter/BYD-MODBUS.cpp index 417be2df..bbd6fcd1 100644 --- a/Software/src/inverter/BYD-MODBUS.cpp +++ b/Software/src/inverter/BYD-MODBUS.cpp @@ -109,6 +109,9 @@ void handle_update_data_modbusp301_byd() { } void verify_temperature_modbus() { + if (LFP_Chemistry) { + return; // Skip the following section + } // This section checks if the battery temperature is negative, and incase it falls between -9.0 and -20.0C degrees // The Fronius Gen24 (and other Fronius inverters also affected), will stop charge/discharge if the battery gets colder than -10°C. // This is due to the original battery pack (BYD HVM), is a lithium iron phosphate battery, that cannot be charged in cold weather. diff --git a/Software/src/inverter/BYD-MODBUS.h b/Software/src/inverter/BYD-MODBUS.h index bb34b3ce..c866b4a1 100644 --- a/Software/src/inverter/BYD-MODBUS.h +++ b/Software/src/inverter/BYD-MODBUS.h @@ -29,6 +29,7 @@ extern uint16_t capacity_Wh_startup; extern uint16_t max_power; extern uint16_t max_voltage; extern uint16_t min_voltage; +extern bool LFP_Chemistry; void handle_static_data_modbus_byd(); void verify_temperature_modbus();