mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-03 02:36:11 +00:00
feat(units): imperial min-distance gate + imperial map grid
Follow the global Units preference in the two remaining Trail distance spots that were still metric-only: - Min dist gate: the index is now a unit-agnostic level (0=finest..3). Metric stays 5/10/25/100 m; imperial uses round 15/30/75/300 ft (applied as their metre equivalents in the sampling gate). - Map scale grid: imperial mode uses round ft/mi steps (10 ft … 100 mi) instead of metric steps with a converted label. Step storage moved to float metres so sub-metre imperial steps keep their geometry; labels come from a parallel table so the scale bar reads an exact round value. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1921,7 +1921,8 @@ void UITask::loop() {
|
||||
_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);
|
||||
uint16_t md = TrailStore::minDeltaMeters(_node_prefs->trail_min_delta_idx,
|
||||
_node_prefs->units_imperial);
|
||||
_trail.addPoint((int32_t)loc->getLatitude(),
|
||||
(int32_t)loc->getLongitude(),
|
||||
(uint32_t)rtc_clock.getCurrentTime(), md);
|
||||
|
||||
Reference in New Issue
Block a user