feat(ui): trail — fixed 1 s sampling; drop GPS upd + Trail int from settings

GPS NMEA polling is cheap, and a slower cadence just hides motion from
the trail; the min-delta gate already filters jitter without throttling
the GPS. Both knobs that exposed cadence-style controls to the user are
removed:

- Trail sampling is fixed at TrailStore::SAMPLING_SECS = 1 s, matching
  the sensor manager's built-in GPS update default. The
  intervalSecs / intervalLabel / INTERVAL_COUNT helpers go with it.
- GPS update rate ("GPS upd" entry) leaves the sensor manager on its
  built-in 1 s default. applyGPSInterval and the GPS_INTERVAL_OPTS /
  LABELS tables / gpsIntervalIndex helper are deleted.

Both NodePrefs fields (gps_interval, trail_interval_idx) are retained
as reserved so the schema sentinel doesn't have to bump — older saves
load cleanly, the bytes are just ignored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-25 10:48:03 +02:00
co-authored by Claude Sonnet 4.6
parent 4eb4e78a3f
commit b574d7829a
5 changed files with 13 additions and 72 deletions
+1 -9
View File
@@ -1754,8 +1754,7 @@ void UITask::loop() {
// fix; min-delta gate inside addPoint() avoids near-stationary spam.
if (_trail.isActive() && _node_prefs != NULL
&& (int32_t)(millis() - _next_trail_sample_ms) >= 0) {
uint16_t interval_s = TrailStore::intervalSecs(_node_prefs->trail_interval_idx);
_next_trail_sample_ms = millis() + (uint32_t)interval_s * 1000UL;
_next_trail_sample_ms = millis() + (uint32_t)TrailStore::SAMPLING_SECS * 1000UL;
LocationProvider* loc = _sensors ? _sensors->getLocationProvider() : nullptr;
if (loc && loc->isValid()) {
uint16_t md = TrailStore::minDeltaMeters(_node_prefs->trail_min_delta_idx);
@@ -1854,13 +1853,6 @@ void UITask::applyTxPower() {
radio_set_tx_power(_node_prefs->tx_power_dbm);
}
void UITask::applyGPSInterval() {
if (_node_prefs == NULL) return;
char buf[12];
snprintf(buf, sizeof(buf),"%u", _node_prefs->gps_interval);
sensors.setSettingValue("gps_interval", buf);
}
void UITask::applyBrightness() {
if (_display != NULL && _node_prefs != NULL) {
_display->setBrightness(_node_prefs->display_brightness);