Add low 12V voltage safety to Volvo

This commit is contained in:
Daniel Öster 2025-09-18 10:48:56 +03:00
parent 3ead4d12d4
commit 269c655dc5
2 changed files with 8 additions and 1 deletions

View file

@ -86,6 +86,13 @@ void VolvoSpaBattery::
datalayer.battery.info.total_capacity_Wh = 69511;
}
}
//Check safeties
if (datalayer_extended.VolvoPolestar.BECMsupplyVoltage < 10700) { //10.7V,
//If 12V voltage goes under this, latch battery OFF to prevent contactors from swinging between on/off
set_event(EVENT_12V_LOW, (datalayer_extended.VolvoPolestar.BECMsupplyVoltage / 100));
set_event(EVENT_BATTERY_CHG_DISCHG_STOP_REQ, 0);
}
}
void VolvoSpaBattery::handle_incoming_can_frame(CAN_frame rx_frame) {

View file

@ -766,7 +766,7 @@ struct DATALAYER_INFO_VOLVO_POLESTAR {
uint16_t soc_calc = 0;
uint16_t soc_rescaled = 0;
uint16_t soh_bms = 0;
uint16_t BECMsupplyVoltage = 0;
uint16_t BECMsupplyVoltage = 12000;
uint16_t BECMBatteryVoltage = 0;
int16_t BECMBatteryCurrent = 0;