Safety tweaks for double battery

This commit is contained in:
Daniel Öster 2024-07-11 19:09:21 +03:00
parent 8b952b805c
commit 12ec967e5d
7 changed files with 47 additions and 24 deletions

View file

@ -606,7 +606,7 @@ void handle_CAN_contactors() {
if (abs(datalayer.battery.status.voltage_dV - datalayer.battery2.status.voltage_dV) < 30) { // If we are within 3.0V
clear_event(EVENT_VOLTAGE_DIFFERENCE);
if (datalayer.battery2.status.bms_status != FAULT) { // Only proceed if BMS on battery2 is not faulted
if (datalayer.battery.status.bms_status != FAULT) { // Only proceed if we are not in faulted state
datalayer.system.status.battery2_allows_contactor_closing = true;
}
} else { //We are over 3.0V diff