mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
perf(ui-lvgl): lower clock when idle, fewer redraws, wake on BLE frames
- CPU at 80 MHz with the screen on after 2 s without touch or animation; a touch restores the full clock before its frame is drawn - setText(): periodic refreshes no longer redraw unchanged labels (status bar, Home, lock, Diag, GPS, compass, clock, map, nav, nearby) - map markers kept across the 3 s rebuild when unchanged - app connected: the loop blocks until a BLE frame arrives (serialFrameArrived / hasPendingFrames) instead of polling every 2 ms - PSRAM: boot frame sprite and the HTTP response buffer released Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -729,7 +729,7 @@ void UITask::homeMapLayout() {
|
||||
}
|
||||
const char* hint = !mapview::s_available ? "No map on the SD card"
|
||||
: !shown && !s_pending ? "No map tiles for this area" : nullptr;
|
||||
if (hint) { lv_label_set_text(s_hint, hint); lv_obj_remove_flag(s_hint, LV_OBJ_FLAG_HIDDEN); }
|
||||
if (hint) { setText(s_hint, hint); lv_obj_remove_flag(s_hint, LV_OBJ_FLAG_HIDDEN); }
|
||||
else lv_obj_add_flag(s_hint, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
|
||||
@@ -786,14 +786,14 @@ void UITask::refreshHome() {
|
||||
if (known) {
|
||||
char date[48];
|
||||
fmtDate(date, sizeof(date), ti);
|
||||
lv_label_set_text(_home_date, date);
|
||||
setText(_home_date, date);
|
||||
} else {
|
||||
lv_label_set_text(_home_date, "time not synced");
|
||||
setText(_home_date, "time not synced");
|
||||
}
|
||||
for (int i = 0; i < FIELDS; i++) {
|
||||
if (!s_field_val[i] || !_prefs) continue;
|
||||
char v[24];
|
||||
homeFieldText(_prefs->dashboard_fields[i], v, sizeof(v));
|
||||
lv_label_set_text(s_field_val[i], v);
|
||||
setText(s_field_val[i], v);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user