mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-15 09:53:58 +01:00
elegant ota test
This commit is contained in:
parent
d79f79ad7b
commit
f353259d97
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//#include <ElegantOTA.h>
|
||||
#include <ElegantOTA.h>
|
||||
#include <WiFi.h>
|
||||
#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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/*#include <ESPAsyncWebServer.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <ElegantOTA.h>
|
||||
#include <AsyncTCP.h>*/
|
||||
#include <AsyncTCP.h>
|
||||
#include <SPIFFS.h>
|
||||
#include <WiFi.h>
|
||||
#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!");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue