update for v14, (almost) working ota

This commit is contained in:
2019-11-10 21:56:05 +01:00
parent 65a1a3027b
commit c367091adf
2 changed files with 5 additions and 2 deletions

View File

@@ -71,11 +71,13 @@ void wifi_loop() {
String version = settings.name;
version.concat("-v");
version.concat(FW_VERSION);
PRINTLN_SERIAL("net.status: " + String(net.status()));
t_httpUpdate_return ret = ESPhttpUpdate.update(net, OTA_SERVER, OTA_PORT, OTA_URI, version);
switch(ret) {
case HTTP_UPDATE_FAILED: // HTTP 403, 404
PRINT_SERIAL("Firmware upgrade available, but update failed ");
APPEND_SERIAL(" (ERR ");
PRINT_SERIAL("Connection error, update failed ");
APPEND_SERIAL("(ERR ");
APPEND_SERIAL(String(ESPhttpUpdate.getLastError()));
APPEND_SERIAL(") ");
APPENDLN_SERIAL(ESPhttpUpdate.getLastErrorString().c_str());