mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
feat(companion): double the GPS trail buffer (512 -> 1024 points)
RAM headroom allows it: +8KB resident (TrailStore::_buf), pushing static RAM to 73.0%/75.0% on GAT562/WioTrackerL1Eink respectively. On-disk snapshot format is unaffected (count is a uint16_t, already asserted to fit far past this); an old 512-point snapshot still loads fine on this firmware. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "GeoUtils.h"
|
||||
|
||||
// RAM-only GPS trail ring buffer.
|
||||
// Storage cost: CAPACITY(512) × sizeof(TrailPoint)(16 B, padded) = 8 KB,
|
||||
// Storage cost: CAPACITY(1024) × sizeof(TrailPoint)(16 B, padded) = 16 KB,
|
||||
// always resident (UITask::_trail member). The trail survives auto-off (only
|
||||
// the display blanks) but is lost on reboot — user explicitly snapshots to a
|
||||
// LittleFS slot before powering down to keep it.
|
||||
@@ -24,7 +24,7 @@ static const uint8_t TRAIL_FLAG_SEG_START = 0x01;
|
||||
|
||||
class TrailStore {
|
||||
public:
|
||||
static const int CAPACITY = 512;
|
||||
static const int CAPACITY = 1024;
|
||||
// _count is serialised as uint16_t in the save header — fail the build loudly
|
||||
// if CAPACITY is ever grown past what that can hold, rather than truncating.
|
||||
static_assert(CAPACITY <= 0xFFFF, "TrailStore::CAPACITY must fit in the uint16_t save-header count");
|
||||
|
||||
Reference in New Issue
Block a user