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,10 +71,12 @@ 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 ");
PRINT_SERIAL("Connection error, update failed ");
APPEND_SERIAL("(ERR ");
APPEND_SERIAL(String(ESPhttpUpdate.getLastError()));
APPEND_SERIAL(") ");

View File

@@ -30,6 +30,7 @@
// (background: http://iot-bits.com/esp8266/esp8266-reset-causes-rst-cause/
// Version history:
// v14: Initial OTA support
// v13: Refactored so config-settings are in config.h, move from Adafruit Neopixel to WS2812FX library
// v12: Refactored inbound commands to hook in to the modules (module_message function), completed assimilation of (never-published) Moon_Connected sketch
// v11: Simplified scheduler, back to cooperative looping