mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-19 12:02:03 +00:00
refactor(ui-lvgl): review -- shared button bar, confirms, notes, local time
- Dead code gone: anim::fadeHide, radioctl::presetCount, the L2 board's setSdPower / setGrovePower / expanderOK (awRead, gnssReset now private). - buttonBar() / barButton() replace 7 copies of the popup button row. - confirmBody(): one red-button confirm for reboot / power off, reset counters, admin commands, preset and scope delete. - tapConfirmed(): the 11 "tap again" buttons share one mechanism, 3 s everywhere, the label restored when left alone. - noteLabel() for ~30 wrapped notes. - localTm() in NodePrefs.h and one MONTHS table: lvgl, MsgExpand, the L1 clock and lock screen. - The sim keeps UI settings in an in-memory nvs::, so one set of load / save helpers serves both. - Asleep, the loop wakes every 50 ms (the button / touch poll), not 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -807,10 +807,9 @@ public:
|
||||
display.drawTextCentered(display.width() / 2, mid_y + step, "Enable GPS or");
|
||||
display.drawTextCentered(display.width() / 2, mid_y + step * 2, "connect app");
|
||||
} else {
|
||||
int8_t tz = _node_prefs ? _node_prefs->tz_offset_hours : 0;
|
||||
unix_ts += (int32_t)tz * 3600;
|
||||
time_t t = (time_t)unix_ts;
|
||||
struct tm* ti = gmtime(&t);
|
||||
struct tm lt;
|
||||
localTm(unix_ts, _node_prefs ? _node_prefs->tz_offset_hours : 0, lt);
|
||||
struct tm* ti = <
|
||||
|
||||
char buf[24];
|
||||
display.setColor(DisplayDriver::LIGHT);
|
||||
@@ -954,10 +953,9 @@ public:
|
||||
if (unix_ts < 1000000000UL) {
|
||||
display.drawTextCentered(display.width() / 2, display.height() / 2 - step, "No time sync");
|
||||
} else {
|
||||
int8_t tz = _node_prefs ? _node_prefs->tz_offset_hours : 0;
|
||||
unix_ts += (int32_t)tz * 3600;
|
||||
time_t t = (time_t)unix_ts;
|
||||
struct tm* ti = gmtime(&t);
|
||||
struct tm lt;
|
||||
localTm(unix_ts, _node_prefs ? _node_prefs->tz_offset_hours : 0, lt);
|
||||
struct tm* ti = <
|
||||
char buf[12];
|
||||
bool h12 = _node_prefs && _node_prefs->clock_12h;
|
||||
int date_y = drawClockTime(display, 0, ti, h12, /*show_sec*/false);
|
||||
|
||||
Reference in New Issue
Block a user