mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
Safety tweaks for double battery
This commit is contained in:
parent
8b952b805c
commit
12ec967e5d
7 changed files with 47 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue