mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-03 03:11:57 +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:
@@ -91,13 +91,13 @@ static void setLive(int i, const diag::Row& r) {
|
||||
const char* slash = strchr(r.value, '/');
|
||||
char a[12];
|
||||
snprintf(a, sizeof(a), "%.*s", slash ? (int)(slash - r.value) : (int)strlen(r.value), r.value);
|
||||
lv_label_set_text(lv.in, a);
|
||||
lv_label_set_text(lv.out, slash ? slash + 1 : "");
|
||||
setText(lv.in, a);
|
||||
setText(lv.out, slash ? slash + 1 : "");
|
||||
return;
|
||||
}
|
||||
char v[40];
|
||||
showValue(r.label, r.value, v, sizeof(v));
|
||||
lv_label_set_text(lv.val, v);
|
||||
setText(lv.val, v);
|
||||
if (!strcmp(r.label, "Errors")) lv_obj_set_style_text_color(lv.val, lv_color_hex(strcmp(r.value, "OK") ? theme::FAIL : theme::OK), 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user