Trip log crash-safe like a FIT: an append-only journal per trip (data/trip_log/<started>.ndjson, fsynced every 5 s, a torn last line skipped and the next one on a line of its own), a restart picks the running trip up from it into the same track, no state file to corrupt; the library's track built from it every 5 min and at the end. Drive mode: a pinned side panel's room goes back to the map
CI / check (push) Successful in 43s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-12-01 10:14:57 +01:00
1 parent 0c809b3e2b
commit bd689faa93
5 files changed
+154 -62

No files matched your search

+1 -1
View File
@@ -747,7 +747,7 @@ module Maptool
# the line's coordinates from N on), POST {"name"} starts it — a
# Trips/<date> <name> folder with the planned route and its stops —
# DELETE ends it. Every fix goes in meanwhile (App.gnss_update).
TRIP_LOG = TripLog.new(File.join(DATA_DIR, "trip_log.json"), library: LIBRARY)
TRIP_LOG = TripLog.new(File.join(DATA_DIR, "trip_log"), library: LIBRARY)
get "/api/trip/log" do
require_login!