mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-04 11:16:13 +00:00
refactor(companion): tidy geo-alert / live-share; dedicated auto-pause gate
Review cleanup of the new location features: - GeoAlertScreen + LiveShareScreen use the shared drawList() helper instead of hand-rolling the scroll/clamp/scrollbar maths, matching every other list screen. - Extract UITask::geoAlertDistance() — one place for the target-distance maths, shared by the crossing evaluator and the proximity beeper. - Geo Alert re-seeds its crossing engine after every edit, so changing the target/radius while armed can't fire a stale arrive/leave before exit. - Trail auto-pause gets its own coarse movement gate (NodePrefs::TRAIL_AUTOPAUSE_MOVE_M = 15 m) instead of reusing the trail min-delta, so GPS jitter while parked doesn't keep the idle timer alive. - Fix stale include comments. Verified: WioTrackerL1_companion_solo_dual builds clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
408dfd494b
commit
659ecec5a4
@@ -300,6 +300,11 @@ struct NodePrefs { // persisted to file
|
||||
static const char* L[TRAIL_AUTOPAUSE_COUNT] = { "Off", "1m", "2m", "5m" };
|
||||
return L[idx < TRAIL_AUTOPAUSE_COUNT ? idx : 0];
|
||||
}
|
||||
// Movement under this many metres counts as "stationary" for auto-pause.
|
||||
// Deliberately coarser than the trail min-delta gate (and independent of it)
|
||||
// so GPS jitter while parked doesn't keep resetting the idle timer. Engine
|
||||
// tuning only — not persisted.
|
||||
static const uint16_t TRAIL_AUTOPAUSE_MOVE_M = 15;
|
||||
|
||||
// Tail sentinel written at the end of /new_prefs. Bump the low byte when
|
||||
// adding/removing/reordering fields in DataStore::savePrefs/loadPrefsInt so
|
||||
|
||||
Reference in New Issue
Block a user