mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
refactor(ui): remove dead code and fix stale comments after the review
- ui-core: Diagnostics::systemLines, NearbyModel::typeShort, rptctl::currentPresetName, RoomSessions::pendingKey, settings::isSwitch, UiCore::reconcileDMUnread. - ui-new: the retired Recent page, fmtAlt, the battMvToPercent wrapper, setFavouriteChannelSlot, AccordionList onHeader/visibleCount, drawBoxedIcon and seven unused icons; info::row folded into info::valueRow. - ui-lvgl: onOpenNav, TileDownloader::withTrails; the trail header size is one constant (TRAIL_HDR) for live and saved trails. - Home quick panels save prefs only when a value changed. - Comments brought in line with the code (status bar reserve, settings rows, page order, SH1106 frame skip, UiCore header). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1131,7 +1131,7 @@ bool UITask::saveTrailToCard(char* name_out, size_t n) {
|
||||
// ring (the oldest points dropping off) is rewritten, at most every 10 min.
|
||||
namespace navmap {
|
||||
static const char* const LIVE_TRAIL = "/sdcard/trails/.live.trl";
|
||||
static const long LIVE_HDR = 12; // magic, version, reserved, count (uint16), time (uint32)
|
||||
static const long TRAIL_HDR = 12; // a trail file's header (TrailStore::writeTo): magic, version, flags, count (uint16), time (uint32)
|
||||
static uint32_t s_j_gen = 0xFFFFFFFF, s_j_seq = 0, s_j_next = 0, s_j_full_at = 0;
|
||||
static int s_j_n = 0;
|
||||
static uint8_t s_j_rec = 0; // the "recording" byte last written
|
||||
@@ -1202,7 +1202,7 @@ void UITask::savedTrailsPopup() {
|
||||
navmap::trailTitle(navmap::s_st_names[i], title, sizeof(title));
|
||||
snprintf(path, sizeof(path), "%s/%s", navmap::TRAILS_DIR, navmap::s_st_names[i]);
|
||||
struct stat st;
|
||||
long pts = stat(path, &st) == 0 ? ((long)st.st_size - 12) / (long)sizeof(TrailPoint) : 0;
|
||||
long pts = stat(path, &st) == 0 ? ((long)st.st_size - navmap::TRAIL_HDR) / (long)sizeof(TrailPoint) : 0;
|
||||
snprintf(sub, sizeof(sub), "%ld points", pts > 0 ? pts : 0);
|
||||
listRow(list, title, sub, onSavedTrail, (void*)(intptr_t)i);
|
||||
}
|
||||
|
||||
@@ -2786,7 +2786,6 @@ static void onOpenSettings(lv_event_t* e) { (void)e; s_ui->showSettings(); }
|
||||
|
||||
static void onOpenNearby(lv_event_t* e) { (void)e; s_ui->showNearby(); }
|
||||
static void onOpenNodesMap(lv_event_t* e) { (void)e; s_ui->openMap(false); }
|
||||
static void onOpenNav(lv_event_t* e) { (void)e; s_ui->openMap(true); }
|
||||
static void onOpenClock(lv_event_t* e); // ClockScreen.h
|
||||
static void onOpenBot(lv_event_t* e); // BotScreen.h
|
||||
static void onOpenCompass(lv_event_t* e); // CompassScreen.h
|
||||
|
||||
@@ -95,7 +95,6 @@ public:
|
||||
|
||||
State state() const { return _state; }
|
||||
const TileArea& area() const { return _area; } // of the current / last job
|
||||
bool withTrails() const { return _trails; }
|
||||
bool active() const { return _state == CONNECTING || _state == RUNNING; }
|
||||
uint32_t total() const { return _total; }
|
||||
uint32_t processed() const { return _done + _skipped + _failed; }
|
||||
|
||||
Reference in New Issue
Block a user