diff --git a/platformio.ini b/platformio.ini index 3591ec4..e20b1ac 100644 --- a/platformio.ini +++ b/platformio.ini @@ -27,9 +27,9 @@ lib_deps = adafruit/Adafruit BME680 Library@^2.0.4 jgromes/RadioLib @ 6.1.0 lewisxhe/XPowersLib@^0.1.8 - ayushsharma82/AsyncElegantOTA@^2.2.7 + ayushsharma82/ElegantOTA@^3.1.0 ottowinter/ESPAsyncWebServer-esphome@^3.0.0 - esphome/AsyncTCP-esphome@^2.0.0 + esphome/AsyncTCP-esphome@^2.1.1 [env:ttgo-lora32-v21] diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 99beefb..7a86622 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -66,7 +66,7 @@ void setup() { Utils::validateDigiFreqs(); iGateBeaconPacket = GPS_Utils::generateBeacon(); iGateLoRaBeaconPacket = GPS_Utils::generateiGateLoRaBeacon(); - //Utils::startServer(); + Utils::startServer(); SYSLOG_Utils::setup(); BME_Utils::setup(); } @@ -90,7 +90,7 @@ void loop() { if (lastStationModeState == 1) { iGateBeaconPacket = GPS_Utils::generateBeacon(); lastStationModeState = 0; - //Utils::startServer(); + Utils::startServer(); } APRS_IS_Utils::loop(); } else { // DigiRepeater Mode diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index 8f0970e..c672f1b 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -1,4 +1,4 @@ -//#include +#include #include #include "configuration.h" #include "aprs_is_utils.h" @@ -232,7 +232,7 @@ namespace APRS_IS_Utils { aprsisPacket.concat(espClient.readStringUntil('\r')); processAPRSISPacket(aprsisPacket); } - //ElegantOTA.loop(); + ElegantOTA.loop(); } } } \ No newline at end of file diff --git a/src/utils.cpp b/src/utils.cpp index a04bdbb..fa8a444 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1,6 +1,6 @@ -/*#include +#include #include -#include */ +#include #include #include #include "configuration.h" @@ -16,7 +16,7 @@ #include "display.h" #include "utils.h" -//AsyncWebServer server(80); +AsyncWebServer server(80); extern WiFiClient espClient; extern Configuration Config; @@ -51,9 +51,9 @@ unsigned long ota_progress_millis = 0; namespace Utils { - /*void notFound(AsyncWebServerRequest *request) { + void notFound(AsyncWebServerRequest *request) { request->send(404, "text/plain", "Not found"); - }*/ + } void processStatus() { String status = Config.callsign + ">APLRG1,WIDE1-1"; @@ -318,7 +318,7 @@ namespace Utils { } } - /*void onOTAStart() { + void onOTAStart() { Serial.println("OTA update started!"); display_toggle(true); lastScreenOn = millis(); @@ -346,8 +346,8 @@ namespace Utils { show_display("", "", " OTA update fail!", "", "", "", "", 4000); } } - */ - /*void startServer() { + + 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 APRS iGate , version " + versionDate + "\n\nTo update your firmware or filesystem go to: http://" + getLocalIP().substring(getLocalIP().indexOf(":")+3) + "/update\n\n\n73!"); @@ -395,6 +395,6 @@ namespace Utils { server.begin(); Serial.println("init : OTA Server ... done!"); } - }*/ + } } \ No newline at end of file diff --git a/src/utils.h b/src/utils.h index 9b2a261..701ea1d 100644 --- a/src/utils.h +++ b/src/utils.h @@ -14,10 +14,10 @@ namespace Utils { void checkWiFiInterval(); void validateDigiFreqs(); void typeOfPacket(String packet, String packetType); - /*void onOTAStart(); + void onOTAStart(); void onOTAProgress(size_t current, size_t final); void onOTAEnd(bool success); - void startServer();*/ + void startServer(); }