mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
feat(trail): record altitude in trail points
Each point keeps the GPS altitude in what was padding, so a point stays 16 bytes. The save format goes to version 2; version 1 files still load, with the altitude unknown. GPX export writes <ele>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -902,7 +902,7 @@ template <typename F>
|
||||
static bool trailSummary(F& io, int& points, float& meters, uint32_t& secs) {
|
||||
uint16_t cnt = 0;
|
||||
uint32_t accum = 0;
|
||||
if (!persist::readHeader(io, TrailStore::SAVE_MAGIC, TrailStore::SAVE_VERSION, cnt)) return false;
|
||||
if (!persist::readHeader(io, TrailStore::SAVE_MAGIC, TrailStore::SAVE_VERSION, cnt, 1)) return false;
|
||||
if (io.read((uint8_t*)&accum, sizeof(accum)) != (int)sizeof(accum)) return false;
|
||||
points = 0; meters = 0; secs = accum / 1000;
|
||||
TrailPoint prev, p;
|
||||
|
||||
Reference in New Issue
Block a user