diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index ad8e961..f255fe9 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -233,6 +233,32 @@ const char *handleWIFIPost(AsyncWebServerRequest *request) { setupWifiList(); } +// Show current status +void addSondeStatus(char *ptr, int i) +{ + SondeInfo *s = &sonde.sondeList[i]; + strcat(ptr, ""); + sprintf(ptr+strlen(ptr),"\n", + s->freq, sondeTypeStr[s->type], + s->validID?s->id:"", + s->lat, s->lon, s->hei); + sprintf(ptr+strlen(ptr), "", s->lat, s->lon); + strcat(ptr, "
%3.3f MHz, Type: %s
ID: %s
QTH: %.6f,%.6f h=%.0fm
Geo-Ref -", s->lat, s->lon); + sprintf(ptr+strlen(ptr), "Google map - ", s->lat, s->lon); + sprintf(ptr+strlen(ptr), "OSM

\n"); +} + +const char *createStatusForm() { + char *ptr = message; + strcpy(ptr,""); + + for(int i=0; i"); + return message; +} + const char* PARAM_MESSAGE = "message"; void SetupAsyncServer() { // Route for root / web page @@ -263,6 +289,10 @@ void SetupAsyncServer() { handleWIFIPost(request); request->send(200, "text/html", createWIFIForm()); }); + + server.on("/status.html", HTTP_GET, [](AsyncWebServerRequest *request){ + request->send(200, "text/html", createStatusForm()); + }); // Route to load style.css file server.on("/style.css", HTTP_GET, [](AsyncWebServerRequest *request){ diff --git a/RX_FSK/data/index.html b/RX_FSK/data/index.html index 9209c1a..7e78cf1 100644 --- a/RX_FSK/data/index.html +++ b/RX_FSK/data/index.html @@ -17,6 +17,7 @@

+
@@ -30,6 +31,11 @@ +
+

Data

+ +
+

About

RDZSonde diff --git a/RX_FSK/data/style.css b/RX_FSK/data/style.css index 4f33a93..57ee6d1 100644 --- a/RX_FSK/data/style.css +++ b/RX_FSK/data/style.css @@ -4,6 +4,16 @@ body, html { font-family: Arial; } +table, th, td { + border: 1px solid black; + border-collapse: collapse; + background-color: #ddd +} + +td#sfreq { + background-color: #ccc; +} + .tab { overflow: hidden; border: 1px solid #ccc;