mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Move SOH reading, add webserver string
This commit is contained in:
parent
9be8bc6455
commit
6eb0881553
2 changed files with 9 additions and 6 deletions
|
@ -259,6 +259,12 @@ void receive_can_battery(CAN_frame_t rx_frame) {
|
|||
cellvoltages_mv[82] = (rx_frame.data.u8[6] * 20);
|
||||
cellvoltages_mv[83] = (rx_frame.data.u8[7] * 20);
|
||||
} else if (poll_data_pid == 5) {
|
||||
if (rx_frame.data.u8[6] > 0) {
|
||||
batterySOH = rx_frame.data.u8[6];
|
||||
}
|
||||
if (batterySOH > 100) {
|
||||
batterySOH = 100;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x24: //Fourth datarow in PID group
|
||||
|
@ -316,12 +322,6 @@ void receive_can_battery(CAN_frame_t rx_frame) {
|
|||
//Map all cell voltages to the global array, we have sampled them all!
|
||||
memcpy(datalayer.battery.status.cell_voltages_mV, cellvoltages_mv, 96 * sizeof(uint16_t));
|
||||
} else if (poll_data_pid == 5) {
|
||||
if (rx_frame.data.u8[6] > 0) {
|
||||
batterySOH = rx_frame.data.u8[6];
|
||||
}
|
||||
if (batterySOH > 100) {
|
||||
batterySOH = 100;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x26: //Sixth datarow in PID group
|
||||
|
|
|
@ -517,6 +517,9 @@ String processor(const String& var) {
|
|||
#ifdef RENAULT_ZOE_GEN2_BATTERY
|
||||
content += "Renault Zoe Gen2 50";
|
||||
#endif
|
||||
#ifdef SANTA_FE_PHEV_BATTERY
|
||||
content += "Santa Fe PHEV";
|
||||
#endif
|
||||
#ifdef SERIAL_LINK_RECEIVER
|
||||
content += "Serial link to another LilyGo board";
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue