docs: BUG-12 closed — OBD API fallback fixes dashboard blank state, GPS toFixed crash fixed

This commit is contained in:
Mathieu Moran
2026-08-11 16:32:15 -04:00
parent 91281b1e55
commit e8156bc39a
+15
View File
@@ -44,6 +44,21 @@ When CLOSED, move the entire entry to Resolved — don't duplicate.
--- ---
### BUG-12 — Dashboard OBD shows "—" while Status page shows correct OBD state
- **Status**: `CLOSED` 2026-08-11
- **Commit**: `91281b1`
- **Symptom**: Dashboard OBD card showed "—" (blank) even though the Status
page correctly reported adapter present at /dev/ttyUSB0 (disconnected from car).
- **Root cause**: Dashboard relied solely on Socket.IO `obd_status` events. If
the page loaded after the initial event fired, the card stayed at the HTML
default. Status page queried `_obd_status()` directly.
- **Fix**: Added `/api/obd/status` endpoint. Dashboard calls `refreshObdStatus()`
on load + every 15s. Socket events still update in real-time.
- **Side fix**: `renderGpsStatus()` crashed on `status.latitude.toFixed` because
the API returns lat/lon as strings — fixed with `Number()` wrapper.
- **Verification**: Dashboard shows "Disconnected" matching Status page. GPS no
longer crashes. Confirmed on live Pi 2026-08-11.
--- ---
## Resolved ## Resolved