Power status: " + String(get_emulator_pause_status().c_str()) + "
";
#ifdef CONTACTOR_CONTROL
content += "
Contactors controlled by Battery-Emulator: ";
@@ -822,9 +829,9 @@ String processor(const String& var) {
#endif // defined CHEVYVOLT_CHARGER || defined NISSANLEAF_CHARGER
if (emulator_pause_request_ON)
- content += "";
+ content += "";
else
- content += "";
+ content += "";
content += " ";
content += "";
content += " ";
@@ -888,6 +895,10 @@ void onOTAStart() {
// If already set, make a new attempt
clear_event(EVENT_OTA_UPDATE_TIMEOUT);
ota_active = true;
+
+ //completely force stop the CAN communication
+ ESP32Can.CANStop();
+
ota_timeout_timer.reset();
}
@@ -920,12 +931,15 @@ void onOTAEnd(bool success) {
#endif // DEBUG_VIA_USB
//try to Resume the battery pause and CAN communication
setBatteryPause(false, false);
+ //resume CAN communication
+ ESP32Can.CANInit();
+
}
}
template // This function makes power values appear as W when under 1000, and kW when over
-String formatPowerValue(String label, T value, String unit, int precision) {
- String result = "
" + label + ": ";
+String formatPowerValue(String label, T value, String unit, int precision, String color) {
+ String result = "
" + label + ": ";
if (std::is_same::value || std::is_same::value || std::is_same::value) {
float convertedValue = static_cast(value);
diff --git a/Software/src/devboard/webserver/webserver.h b/Software/src/devboard/webserver/webserver.h
index 9f76379a..21416850 100644
--- a/Software/src/devboard/webserver/webserver.h
+++ b/Software/src/devboard/webserver/webserver.h
@@ -102,7 +102,7 @@ void onOTAEnd(bool success);
* @return string: values
*/
template
-String formatPowerValue(String label, T value, String unit, int precision);
+String formatPowerValue(String label, T value, String unit, int precision, String color = "white");
extern void storeSettings();