diff --git a/RX_FSK/data/screens.txt b/RX_FSK/data/screens.txt index 84a12cf..b0e5f18 100644 --- a/RX_FSK/data/screens.txt +++ b/RX_FSK/data/screens.txt @@ -37,7 +37,7 @@ # T type string (RS41/DFM9/DFM6/RS92) # C afC value # N ip address (only tiny font) -# S launch site +# S scan list entry info: l/empty: launch site name, #=entry nr, t=total entries, a=active entries # K RS41 kill timer values: Kl launch timer, Kb burst timer, Kc kill countdown # format: K_4: h:mm k_6: h:mm:ss k_s: sssss, nothing shown for other sonde # Mx telemetry value x (t temp p preassure h hyg) [not yet implemented, maybe some day in future] @@ -107,8 +107,9 @@ timer=-1,0,0 key1action=D,#,F,W key2action=#,#,#,# timeaction=#,D,+ -0,0=XScan: -0,8=T +0,0=XScan +0,5=S#: +0,9=T 3,0=F MHz 5,0=S 7,5=n diff --git a/RX_FSK/version.h b/RX_FSK/version.h index 30b9a80..ab18774 100644 --- a/RX_FSK/version.h +++ b/RX_FSK/version.h @@ -1,4 +1,4 @@ const char *version_name = "rdzTTGOsonde"; -const char *version_id = "devel20191211"; +const char *version_id = "devel20191221"; const int SPIFFS_MAJOR=2; -const int SPIFFS_MINOR=1; +const int SPIFFS_MINOR=2; diff --git a/libraries/SondeLib/Display.cpp b/libraries/SondeLib/Display.cpp index 45f4ebf..f129fd1 100644 --- a/libraries/SondeLib/Display.cpp +++ b/libraries/SondeLib/Display.cpp @@ -91,7 +91,7 @@ DispEntry searchLayout[] = { {0, 0, FONT_LARGE, -1, 0xFFFF, 0, disp.drawText, "Scan:"}, {0, 8, FONT_LARGE, -1, 0xFFFF, 0, disp.drawType, NULL}, {3, 0, FONT_LARGE, -1, 0xFFFF, 0, disp.drawFreq, " MHz"}, - {5, 0, FONT_LARGE, -1, 0xFFFF, 0, disp.drawSite, NULL}, + {5, 0, FONT_LARGE, -1, 0xFFFF, 0, disp.drawSite, "l"}, {7, 5, 0, -1, 0xFFFF, 0, disp.drawIP, NULL}, {-1, -1, -1, 0, 0, 0, NULL, NULL}, }; @@ -674,7 +674,9 @@ void Display::parseDispElement(char *text, DispEntry *de) case 'n': de->func = disp.drawIP; break; case 's': - de->func = disp.drawSite; break; + de->func = disp.drawSite; + de->extra = strdup(text+1); + break; case 'k': de->func = disp.drawKilltimer; de->extra = strdup(text+1); @@ -1063,7 +1065,31 @@ void Display::drawIP(DispEntry *de) { } void Display::drawSite(DispEntry *de) { rdis->setFont(de->fmt); - drawString(de, sonde.si()->launchsite); + switch(de->extra[0]) { + case '#': + // currentSonde is index in array starting with 0; + // but we draw "1" for the first entrie and so on... + snprintf(buf, 3, "%2d", sonde.currentSonde+1); + break; + case 't': + snprintf(buf, 3, "%d", sonde.config.maxsonde); + break; + case 'a': + { + uint8_t active = 0; + for(int i=0; ilaunchsite); + return; + } + buf[2]=0; + if(de->extra[0]) strcat(buf, de->extra+1); + drawString(de, buf); } void Display::drawTelemetry(DispEntry *de) { } diff --git a/libraries/SondeLib/Display.h b/libraries/SondeLib/Display.h index 6f34e68..f6238eb 100644 --- a/libraries/SondeLib/Display.h +++ b/libraries/SondeLib/Display.h @@ -156,6 +156,7 @@ public: static void drawIP(DispEntry *de); static void drawSite(DispEntry *de); static void drawTelemetry(DispEntry *de); + static void drawKilltimer(DispEntry *de); static void drawGPS(DispEntry *de); static void drawText(DispEntry *de); static void drawBatt(DispEntry *de);