mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
Add error handling for BYD CAN
This commit is contained in:
parent
0a59baa3ea
commit
d3fc7cc41e
1 changed files with 10 additions and 0 deletions
|
@ -87,6 +87,16 @@ void update_values_can_byd()
|
|||
//Temperature min
|
||||
BYD_210.data.u8[2] = (temperature_min >> 8);
|
||||
BYD_210.data.u8[3] = (temperature_min & 0x00FF);
|
||||
|
||||
//Indicate to inverter if BMS has encountered issues
|
||||
if(bms_status == FAULT;)
|
||||
{
|
||||
BYD_190.data.u8[2] = 0x00; //We are not sure what this means, but battery control will be stopped for 5minutes if this is sent
|
||||
} //Todo, maybe try other values and see if the inverter stops permanently until next reboot?
|
||||
else
|
||||
{
|
||||
BYD_190.data.u8[2] = 0x03; //Indicates battery is OK to continue
|
||||
}
|
||||
}
|
||||
|
||||
void receive_can_byd(CAN_frame_t rx_frame)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue