Update PYLON-CAN.cpp

-clang
This commit is contained in:
LevinSwe 2024-05-04 16:20:05 +02:00 committed by GitHub
parent 0e50c560d6
commit 03c5ce53af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -195,7 +195,7 @@ void update_values_can_inverter() { //This function maps all the values fetched
max_charge_current = 0;
max_discharge_current = 0;
}
//Charge / Discharge allowed
PYLON_4280.data.u8[0] = 0;
PYLON_4280.data.u8[1] = 0;
@ -242,7 +242,7 @@ void update_values_can_inverter() { //This function maps all the values fetched
PYLON_4211.data.u8[2] = (datalayer.battery.status.current_dA & 0x00FF);
PYLON_4211.data.u8[3] = (datalayer.battery.status.current_dA >> 8);
#endif
// BMS Temperature (We dont have BMS temp, send max cell voltage instead)
PYLON_4210.data.u8[4] = ((datalayer.battery.status.temperature_max_dC + 1000) & 0x00FF);
PYLON_4210.data.u8[5] = ((datalayer.battery.status.temperature_max_dC + 1000) >> 8);
@ -341,7 +341,7 @@ void update_values_can_inverter() { //This function maps all the values fetched
PYLON_4211.data.u8[2] = (datalayer.battery.status.current_dA >> 8);
PYLON_4211.data.u8[3] = (datalayer.battery.status.current_dA & 0x00FF);
#endif
// BMS Temperature (We dont have BMS temp, send max cell voltage instead)
PYLON_4210.data.u8[4] = ((datalayer.battery.status.temperature_max_dC + 1000) >> 8);
PYLON_4210.data.u8[5] = ((datalayer.battery.status.temperature_max_dC + 1000) & 0x00FF);
@ -422,7 +422,7 @@ void update_values_can_inverter() { //This function maps all the values fetched
PYLON_4271.data.u8[2] = (datalayer.battery.status.temperature_min_dC >> 8);
PYLON_4271.data.u8[3] = (datalayer.battery.status.temperature_min_dC & 0x00FF);
#endif
//In case we run into any errors/faults, we can set charge / discharge forbidden
if (datalayer.battery.status.bms_status == FAULT) {
PYLON_4280.data.u8[0] = 0xAA;