added missing commit for kill timer display; show scan index

This commit is contained in:
Hansi, dl9rdz 2019-12-21 16:50:51 +01:00
parent 3bdee75a41
commit 833acaa78e
4 changed files with 36 additions and 8 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);
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; i<sonde.config.maxsonde; i++) {
if(sonde.sondeList[i].active) active++;
}
snprintf(buf, 3, "%d", active);
}
break;
case 0: case 'l': default: // launch site
drawString(de, sonde.si()->launchsite);
return;
}
buf[2]=0;
if(de->extra[0]) strcat(buf, de->extra+1);
drawString(de, buf);
}
void Display::drawTelemetry(DispEntry *de) {
}

View File

@ -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);