mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 02:39:57 +02:00
Update PYLON-CAN.cpp
-clang
This commit is contained in:
parent
0e50c560d6
commit
03c5ce53af
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue