mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-04 03:06:12 +00:00
fix(build): trail — :: prefixes on DataStore's openWrite + Trail.h gmtime
Adding the public DataStore::openWrite(const char*) member shadowed
the file-static openWrite(FILESYSTEM*, const char*) helper inside
DataStore.cpp's method bodies, so every internal call broke ("no
matching function" with two args). Qualify each internal call with
::openWrite so name lookup picks the static helper. The new public
member's own implementation already does that.
Trail.h's gpxPoint template called gmtime unqualified; ADL couldn't
find it from the template definition because no argument was
template-dependent. Include <time.h> and call ::gmtime — both passes
the dependency rule and avoids the -fpermissive-only acceptance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
9fe37d39ce
commit
cea3c30f31
@@ -3,6 +3,7 @@
|
||||
#include <Arduino.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
// RAM-only GPS trail ring buffer.
|
||||
// Storage cost: 256 × 12 B = 3 KB. The trail survives auto-off (only the
|
||||
@@ -251,7 +252,7 @@ public:
|
||||
}
|
||||
char buf[120];
|
||||
time_t t = (time_t)p.ts;
|
||||
struct tm* gt = gmtime(&t);
|
||||
struct tm* gt = ::gmtime(&t);
|
||||
int len = snprintf(buf, sizeof(buf),
|
||||
"<trkpt lat=\"%.6f\" lon=\"%.6f\"><time>%04d-%02d-%02dT%02d:%02d:%02dZ</time></trkpt>\n",
|
||||
p.lat_1e6 / 1.0e6, p.lon_1e6 / 1.0e6,
|
||||
|
||||
Reference in New Issue
Block a user