mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
fix(eink): no counts of seconds on e-ink
Message ages, the GPS search time and the sky plot changed every second, and each change is a panel refresh. On e-ink an age under a minute reads "<1m", the search time counts minutes, and the sky redraws every 15 s (at once after a key). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -189,7 +189,12 @@ private:
|
||||
if (g->hdop > 0 && g->hdop < 99) snprintf(a, sizeof(a), "%.1f", g->hdop); else strcpy(a, "-");
|
||||
row(d, f, rsv, "HDOP", a);
|
||||
if (g->ttff_ms) snprintf(a, sizeof(a), "%lu s", (unsigned long)(g->ttff_ms / 1000));
|
||||
else if (g->start_ms) snprintf(a, sizeof(a), "%lu s", (unsigned long)((millis() - g->start_ms) / 1000));
|
||||
else if (g->start_ms) {
|
||||
const unsigned long s = (millis() - g->start_ms) / 1000;
|
||||
if (!Features::IS_EINK) snprintf(a, sizeof(a), "%lu s", s);
|
||||
else if (s < 60) strcpy(a, "<1 min"); // seconds would refresh the panel every second
|
||||
else snprintf(a, sizeof(a), "%lu min", s / 60);
|
||||
}
|
||||
else strcpy(a, "-");
|
||||
row(d, f, rsv, g->ttff_ms ? "First fix" : "Searching", a);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user