mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-03 03:11: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:
@@ -105,7 +105,12 @@ namespace skyview {
|
||||
d.setCursor(x0, y); d.print(buf);
|
||||
y += step;
|
||||
if (g.ttff_ms) snprintf(buf, sizeof(buf), "TTFF %lus", (unsigned long)(g.ttff_ms / 1000));
|
||||
else if (g.start_ms) snprintf(buf, sizeof(buf), "Wait %lus", (unsigned long)((millis() - g.start_ms) / 1000));
|
||||
else if (g.start_ms) {
|
||||
const unsigned long s = (millis() - g.start_ms) / 1000;
|
||||
if (!d.isEink()) snprintf(buf, sizeof(buf), "Wait %lus", s);
|
||||
else if (s < 60) snprintf(buf, sizeof(buf), "Wait <1m"); // in minutes, as the panel refreshes
|
||||
else snprintf(buf, sizeof(buf), "Wait %lum", s / 60);
|
||||
}
|
||||
else buf[0] = 0;
|
||||
d.setCursor(x0, y); d.print(buf);
|
||||
}
|
||||
@@ -178,7 +183,7 @@ namespace skyview {
|
||||
}
|
||||
if (signal) renderSignal(d, *g, top);
|
||||
else renderSky(d, *g, top);
|
||||
return 1000;
|
||||
return d.isEink() ? 15000 : 1000; // the sky shifts slowly; each e-ink redraw is a refresh
|
||||
}
|
||||
|
||||
} // namespace skyview
|
||||
|
||||
Reference in New Issue
Block a user