void handleRoot() { String html = "
"; html += ""; html += ""; html += "";
html += " "; html += " Start demo mode charge and discharge "; html += ""; html += "Start demo mode discharge to zero "; html += ""; html += " "; html += " "; html += ""; html += " | ";
html += " Busvoltage: 0 V "; html += "Shuntvoltage: 0 V "; html += "Strom: 0 A "; html += "Leistung: 0 W "; html += "Energie: 0 Wh "; html += "Temp: 0 °C "; html += "Humidity: 0 % "; html += "Shunt max voltage drop: "+String(globalConfigData.shunt_voltage_drop,0)+" mV "; html += "Shunt max current: "+String(globalConfigData.shunt_max_current,0)+" A "; html += "Current factor: "+String(globalConfigData.current_fact/100,2)+" (div. by 100) "; html += "Max capacity: "+String(globalConfigData.max_capacity,0)+" Wh "; html += "Ina226 refresh period: "+String(globalConfigData.time_ina226_refresh,0)+" s "; html += "Error code: 0 "; html += " |
Updating...
" "" ""; server.send(200, cs_textHtml, message); disableWatchdog(); updateStatus = ""; Serial.print(cs_startingFirmwareUpdate); ESPhttpUpdate.rebootOnUpdate(false); t_httpUpdate_return ret = ESPhttpUpdate.update(String(FIRMWARE_UPDATE_URL)); fwUpdate_isRunning = true; Serial.println(cs_finish); switch (ret) { case HTTP_UPDATE_FAILED: Serial.printf("HTTP_UPDATE_FAILED Error (%d): %s\n", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str()); updateStatus = "Firmware-Update failed.