mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 02:06:11 +00:00
fix(trail,batt): GPX NUL in stream + battery curve top at 4170 mV
- Trail.h gpxWaypoints/gpxPoint: snprintf truncation clamp was `> sizeof` (writing the NUL terminator into the XML stream); corrected to `>= sizeof - 1` at all 3 sites (<wpt>, <time>, <trkpt>). - UITask.cpp battMvToPercent: raise 100% ceiling from 4200 → 4170 mV — the board never charges to 4200, so the indicator was stuck at ~97%. - Trail.h header comment: corrected RAM cost from "256×12 B=3 KB" to actual CAPACITY(512)×16 B=8 KB. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e6f8fb99c7
commit
2cc68fb987
@@ -134,7 +134,7 @@ static int battMvToPercent(int mv, int low_mv) {
|
||||
static const struct { uint16_t mv; uint8_t pct; } CURVE[] = {
|
||||
{3200, 0}, {3300, 3}, {3400, 8}, {3500, 15},
|
||||
{3600, 25}, {3650, 33}, {3700, 45}, {3750, 58},
|
||||
{3800, 68}, {3900, 77}, {4000, 86}, {4100, 93}, {4200, 100}
|
||||
{3800, 68}, {3900, 77}, {4000, 86}, {4100, 93}, {4170, 100}
|
||||
};
|
||||
static const int CURVE_LEN = sizeof(CURVE) / sizeof(CURVE[0]);
|
||||
auto curveAt = [&](int v) -> int {
|
||||
|
||||
Reference in New Issue
Block a user