diff --git a/Software/src/battery/SANTA-FE-PHEV-BATTERY.cpp b/Software/src/battery/SANTA-FE-PHEV-BATTERY.cpp index 98c568b5..5379c119 100644 --- a/Software/src/battery/SANTA-FE-PHEV-BATTERY.cpp +++ b/Software/src/battery/SANTA-FE-PHEV-BATTERY.cpp @@ -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 diff --git a/Software/src/devboard/webserver/webserver.cpp b/Software/src/devboard/webserver/webserver.cpp index 1db0320b..22e37885 100644 --- a/Software/src/devboard/webserver/webserver.cpp +++ b/Software/src/devboard/webserver/webserver.cpp @@ -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