mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-05 14:37:05 +00:00
first test
This commit is contained in:
parent
8dd01f799e
commit
44c94d454b
2 changed files with 16 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue