mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-06 06:55:07 +00:00
test OTA also (only Firmwares and not Filesystem!)
This commit is contained in:
parent
2d4b5c6758
commit
11b45a2345
4 changed files with 20 additions and 12 deletions
|
|
@ -5,6 +5,11 @@
|
|||
#include "lora_utils.h"
|
||||
#include "display.h"
|
||||
#include "utils.h"
|
||||
#include <AsyncTCP.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <AsyncElegantOTA.h>
|
||||
|
||||
AsyncWebServer server(80);
|
||||
|
||||
extern WiFiClient espClient;
|
||||
extern Configuration Config;
|
||||
|
|
@ -132,4 +137,15 @@ void typeOfPacket(String packet) {
|
|||
}
|
||||
}
|
||||
|
||||
void startOTAServer() {
|
||||
if (stationMode==1 || stationMode==2) {
|
||||
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(200, "text/plain", "Hi This is your Richonguzman / CD2RXU LoRa iGate.\nIf you want tu update your firmware please go to: {iGate-IP-Adress}/update");
|
||||
});
|
||||
AsyncElegantOTA.begin(&server);
|
||||
server.begin();
|
||||
Serial.println("HTTP server started (OTA Firmware Updates)!\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue