mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-20 12:15:21 +01:00
first test
This commit is contained in:
parent
8dd01f799e
commit
44c94d454b
|
|
@ -20,7 +20,7 @@
|
|||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
|
||||
String versionDate = "2023.08.19";
|
||||
String versionDate = "2023.08.27";
|
||||
int myWiFiAPIndex = 0;
|
||||
int myWiFiAPSize = Config.wifiAPs.size();
|
||||
WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex];
|
||||
|
|
|
|||
|
|
@ -44,6 +44,11 @@ extern String versionDate;
|
|||
extern uint32_t lastWiFiCheck;
|
||||
extern bool WiFiConnect;
|
||||
|
||||
//
|
||||
const char* htmlPage1 = "<html><body><h1>Page 1</h1></body></html>";
|
||||
const char* htmlPage2 = "<html><body><h1>Page 2</h1></body></html>";
|
||||
//
|
||||
|
||||
namespace Utils {
|
||||
|
||||
void processStatus() {
|
||||
|
|
@ -264,8 +269,17 @@ void typeOfPacket(String packet, String packetType) {
|
|||
void startOTAServer() {
|
||||
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/CD2RXU) 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/CD2RXU) 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("/test1", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(200, "text/plain", htmlPage1 );
|
||||
});
|
||||
|
||||
server.on("/test2", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
request->send(200, "text/plain", htmlPage2 );
|
||||
});
|
||||
|
||||
AsyncElegantOTA.begin(&server);
|
||||
server.begin();
|
||||
Serial.println("init : OTA Server ... done!");
|
||||
|
|
|
|||
Loading…
Reference in a new issue