fix: BUG-21 GPS-speed fallback in server route replay

This commit is contained in:
Mathieu Moran
2026-08-14 22:34:29 -04:00
parent 0fa6cc4988
commit 2fee2de357
3 changed files with 25 additions and 12 deletions
+4 -4
View File
@@ -2282,10 +2282,10 @@ logged as `BUG-XX` entries in [BUGS.md](./BUGS.md) (BUG-16 onward) and fixed + v
- **BUG-20 (server trip IDs inflate) — ✅ FIXED**: `trips.id BIGSERIAL` burned sequence values
on every upsert (recompute after each upload batch). Fixed: sequence clamped to `MAX(id)`
after each recompute + one-time renumber migration — trips now 1..10, sequence at 10.
- **BUG-21 (OBD speed dropout mid-drive) — OPEN**: ELM327 stopped returning speed for ~20 min
on 2026-08-13 (22:23:50→22:43:41 UTC); Pi logged NULL speed (no GPS-speed fallback), so the
replay shows 0 km/h for that stretch. Proposed: GPS-speed fallback in `_log_loop()` + OBD
reconnect on stalled reads.
- **BUG-21 (OBD speed dropout mid-drive) — 🚧 IN PROGRESS**: ELM327 stopped returning speed for
~20 min on 2026-08-13 (22:23:50→22:43:41 UTC). Fix: server `get_trip_route()` now mirrors the
Pi's GPS-speed fallback (derive speed from consecutive GPS points when OBD speed is missing),
so the portal replay no longer flatlines at 0 km/h. Follow-up: OBD reconnect on stalled reads.
Open items from the drive — fill in as reported:
- (none clock-related — BUG-17/BUG-18 closed 2026-08-14).