mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
addPoint() now holds the latest accepted sample as a pending candidate instead of committing it immediately. It only becomes a stored vertex once a later sample proves it was a real bend (cross-track deviation from the last vertex exceeds the min-delta tolerance) — so a straight stretch costs just its two endpoints no matter how long it is, while turns still get a vertex roughly every min-delta of deviation. This stretches the 1024-point buffer over much longer routes without losing shape on curves. The pending candidate is flushed before any segment break (setActive(false), setPaused(true), writeTo()) so the last stretch of a run is never silently dropped just because no bend forced a commit; readFrom()/clear() drop a leftover candidate that belonged to the session being replaced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>