feat(android): live dashboard screen (Phase 28.4)

This commit is contained in:
Mathieu Moran
2026-08-15 19:40:47 -04:00
parent b6f8416b5c
commit cadde5aeee
8 changed files with 542 additions and 30 deletions
+8 -6
View File
@@ -2021,7 +2021,7 @@ tracked in FEATURES.md.
2. **FEAT-02** — QR / claim-code device pairing flow (medium)
3. **FEAT-04** — Replace SIM868 2G GSM with 4G LTE modem (large)
### Phase 28: Native Android companion app — 🚧 IN PROGRESS (28.1 ✅, 28.2 ✅, 28.3 ✅, 28.4–28.7 pending)
### Phase 28: Native Android companion app — 🚧 IN PROGRESS (28.1 ✅, 28.2 ✅, 28.3 ✅, 28.4 ✅, 28.5–28.7 pending)
**Renumbered from former Phase 26 on 2026-08-10 to make room for the road-test bug-fix phase.
Renumbered to Phase 28 on 2026-08-11 to make room for Phase 27 feature additions. Planning
completed 2026-08-11. Detailed implementation plan in [android/plan.md](android/plan.md).**
@@ -2195,11 +2195,13 @@ The app reuses the existing Pi REST API surface with no changes:
a new lightweight endpoint or the app skips this and the Pi's own uploader just sees
the file is already on the server next time it scans.)
**28.4 — Live dashboard**
- GPS position on a MapLibre map (updates every 2s from `/api/gps/status`)
- Speed, RPM, coolant temp, fuel level, throttle cards (from `/api/obd/status` +
socket.io — or polling `/api/stats` every few seconds)
- MIL/DTC indicator (from `/api/dtc`)
**28.4 — Live dashboard ✅ DONE (2026-08-15)**
- `DashboardViewModel` polls `GET /api/gps/status` + `GET /api/obd/status` + `GET /api/stats`
every 2s (start/stop on tab focus), plus a server `/health` check for the cellular dot.
- `DashboardScreen` (new first tab): big speed + RPM cards (RPM color scale), engine stats row
(coolant/fuel/throttle), MIL/DTC card, GPS card (fix/lat/lon/age), overview card, and a
connection status bar (Pi WiFi + Server dots).
- GPS map (MapLibre) deferred — basemap needs internet, which the Pi hotspot doesn't provide.
**28.5 — Trip history**
- List trips from `/api/trips` with date, distance, duration, start/end locations