diff --git a/platformio.ini b/platformio.ini index 4fb1dea..f7fb1d7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,7 +21,7 @@ lib_deps = adafruit/Adafruit GFX Library @ 1.11.5 adafruit/Adafruit SSD1306 @ 2.5.7 ayushsharma82/ElegantOTA@^3.1.0 - ottowinter/ESPAsyncWebServer-esphome@^3.0.0 + ottowinter/ESPAsyncWebServer-esphome@^3.1.0 esphome/AsyncTCP-esphome@^2.0.0 mikalhart/TinyGPSPlus @ 1.0.3 adafruit/Adafruit Unified Sensor@^1.1.9 diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 74a9927..36ddea2 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -1,4 +1,4 @@ -#include +//#include #include #include #include @@ -21,7 +21,7 @@ Configuration Config; WiFiClient espClient; -String versionDate = "2023.12.07"; +String versionDate = "2023.12.19"; int myWiFiAPIndex = 0; int myWiFiAPSize = Config.wifiAPs.size(); WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex]; @@ -90,5 +90,5 @@ void loop() { DIGI_Utils::loop(); } } - ElegantOTA.loop(); + //ElegantOTA.loop(); } \ No newline at end of file diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index 48a3194..cb8eac4 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -1,4 +1,5 @@ #include +//#include #include "configuration.h" #include "aprs_is_utils.h" #include "station_utils.h" @@ -220,6 +221,7 @@ namespace APRS_IS_Utils { processAPRSISPacket(aprsisPacket); } } + //ElegantOTA.loop(); } } \ No newline at end of file diff --git a/src/utils.cpp b/src/utils.cpp index 940ea2b..2c8271f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -314,10 +314,14 @@ namespace Utils { void onOTAStart() { Serial.println("OTA update started!"); - show_display("", "", " OTA update started!", "", "", "", "", 100); + display_toggle(true); + lastScreenOn = millis(); + show_display("", "***** *", "", " OTA update started!", "", "", "", 1000); } void onOTAEnd(bool success) { + display_toggle(true); + lastScreenOn = millis(); if (success) { Serial.println("OTA update finished successfully!"); show_display("", "", " OTA update success!", "", " Rebooting ...", "", "", 2000); @@ -330,7 +334,7 @@ namespace Utils { void startServer() { if (stationMode==1 || stationMode==2 || (stationMode==5 && WiFi.status()==WL_CONNECTED)) { server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) { - request->send(200, "text/plain", "Hi " + Config.callsign + ", \n\nthis is your (Richonguzman/CA2RXU) LoRa iGate , version " + versionDate + ".\n\nTo update your firmware or filesystem go to: http://" + getLocalIP().substring(getLocalIP().indexOf(":")+3) + "/update\n\n\n73!"); + request->send(200, "text/plain", "*Hi " + Config.callsign + ", \n\nthis is your (Richonguzman/CA2RXU) LoRa iGate , version " + versionDate + "\n\nTo update your firmware or filesystem go to: http://" + getLocalIP().substring(getLocalIP().indexOf(":")+3) + "/update\n\n\n73!"); }); server.on("/test", HTTP_GET, [](AsyncWebServerRequest *request) { @@ -349,7 +353,7 @@ namespace Utils { // ElegantOTA.onStart(onOTAStart); //ElegantOTA.onProgress(onOTAProgress); - ElegantOTA.onEnd(onOTAEnd); + //ElegantOTA.onEnd(onOTAEnd); // server.on("/process_form.php", HTTP_POST, [](AsyncWebServerRequest *request){ @@ -375,6 +379,7 @@ namespace Utils { server.begin(); Serial.println("init : OTA Server ... done!"); + ElegantOTA.loop(); } } diff --git a/src/utils.h b/src/utils.h index f70f164..031f022 100644 --- a/src/utils.h +++ b/src/utils.h @@ -5,16 +5,18 @@ namespace Utils { -void processStatus(); -String getLocalIP(); -void setupDisplay(); -void activeStations(); -void checkBeaconInterval(); -void checkDisplayInterval(); -void checkWiFiInterval(); -void validateDigiFreqs(); -void typeOfPacket(String packet, String packetType); -void startServer(); + void processStatus(); + String getLocalIP(); + void setupDisplay(); + void activeStations(); + void checkBeaconInterval(); + void checkDisplayInterval(); + void checkWiFiInterval(); + void validateDigiFreqs(); + void typeOfPacket(String packet, String packetType); + void onOTAStart(); + void onOTAEnd(bool success); + void startServer(); }