mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-05 19:56:11 +00:00
feat(eink): suppress clock seconds to prevent per-second panel refreshes
E-ink panels take ~2 s for a full refresh and visible flicker on every update. Showing seconds caused the clock page to redraw every 1 s, triggering a real panel refresh each time the CRC changed. - Default clock_hide_seconds=1 for EINK_DISPLAY_MODEL builds so fresh installs don't flicker out of the box. - Remove the Seconds setting from SettingsScreen on e-ink so users can't accidentally re-enable it. - Clock page now returns 60 s refresh interval on e-ink (content changes at most once per minute); other home pages capped at 30 s (new messages still force immediate redraw via notify()). - Lock screen refresh interval raised from 1 s to 60 s on e-ink; button presses already reset _next_refresh=0, so unlock feedback is instant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
6a3b8e3135
commit
33ad70221e
@@ -12,7 +12,9 @@ class SettingsScreen : public UIScreen {
|
||||
AUTO_OFF,
|
||||
AUTO_LOCK,
|
||||
BATT_DISPLAY,
|
||||
#if !defined(EINK_DISPLAY_MODEL)
|
||||
CLOCK_SECONDS,
|
||||
#endif
|
||||
CLOCK_FORMAT,
|
||||
FONT,
|
||||
#if defined(EINK_DISPLAY_MODEL)
|
||||
@@ -312,10 +314,12 @@ class SettingsScreen : public UIScreen {
|
||||
display.setCursor(VAL_X, y);
|
||||
uint8_t mode = p ? p->batt_display_mode : 0;
|
||||
display.print(BATT_DISPLAY_LABELS[mode < BATT_DISPLAY_COUNT ? mode : 0]);
|
||||
#if !defined(EINK_DISPLAY_MODEL)
|
||||
} else if (item == CLOCK_SECONDS) {
|
||||
display.print("Seconds");
|
||||
display.setCursor(VAL_X, y);
|
||||
display.print((p && p->clock_hide_seconds) ? "OFF" : "ON");
|
||||
#endif
|
||||
} else if (item == CLOCK_FORMAT) {
|
||||
display.print("Format");
|
||||
display.setCursor(VAL_X, y);
|
||||
@@ -512,11 +516,13 @@ public:
|
||||
if (left) idx = (idx + BATT_DISPLAY_COUNT - 1) % BATT_DISPLAY_COUNT;
|
||||
if (left || right) { p->batt_display_mode = idx; _dirty = true; return true; }
|
||||
}
|
||||
#if !defined(EINK_DISPLAY_MODEL)
|
||||
if (_selected == CLOCK_SECONDS && p && (left || right || enter)) {
|
||||
p->clock_hide_seconds ^= 1;
|
||||
_dirty = true;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (_selected == CLOCK_FORMAT && p && (left || right || enter)) {
|
||||
p->clock_12h ^= 1;
|
||||
_dirty = true;
|
||||
|
||||
Reference in New Issue
Block a user