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:
Jakub
2026-05-26 08:05:05 +02:00
co-authored by Claude Sonnet 4.6
parent 9fe37d39ce
commit cea3c30f31
2 changed files with 13 additions and 12 deletions
+2 -1
View File
@@ -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,