docs: BUG-12 closed — OBD API fallback fixes dashboard blank state, GPS toFixed crash fixed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user