mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
Add a "Mark avg" trail setting (Off/5/10/30 s). When set, Tools › Trail › Mark here samples the GPS fix once a second for the chosen window and stores the mean position instead of one instantaneous fix — a steadier, more accurate mark for a precise spot. A progress screen shows time left + sample count; Cancel aborts; the window then opens the label keyboard as usual. Off (default) keeps marking instant. Sampling runs in WaypointsView::poll() (forwarded from TrailScreen::poll()) so it ticks on the main loop, independent of the slow e-ink render cadence; int64 accumulators avoid overflow over 30 samples. Persisted as NodePrefs::gps_avg_idx (schema 0xC0DE0016): struct field + option table, DataStore rd/write/clamp in lockstep. sizeof unchanged (the uint8_t fits existing tail padding) so the 2488 tripwire still holds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>