mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Add low 12V voltage safety to Volvo
This commit is contained in:
parent
3ead4d12d4
commit
269c655dc5
2 changed files with 8 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue