Commit Graph
349 Commits
Author SHA1 Message Date
Mathieu Moran bfc5ee1615 docs: add BUG-24 (OBD stall reconnect) + GPS replay jitter fix notes 2026-08-15 17:48:23 -04:00
Mathieu Moran b0ad6fde51 fix: force OBD reconnect after ~20s of stale null speed (BUG-24)
obd_speed() now counts consecutive null-speed polls. If the ELM327 returns
null for 10 polls (~20s) while still reporting CAR_CONNECTED, it force-closes
the connection so the reconnect loop re-handshakes instead of silently
flatlining until the next ignition cycle.
2026-08-15 17:47:32 -04:00
Mathieu Moran bfc8ddabd9 fix: smooth GPS-derived replay speed to kill jitter spikes
route_points (Pi) and get_trip_route (server) derived GPS speed from a
single 5s segment, so GPS position jitter could read 150+ km/h when the car
wasn't going that fast. Both now average over a trailing ~30s window (same
as the max-speed calc), so spikes are damped.
2026-08-15 17:38:45 -04:00
Mathieu Moran 2817930bdc feat: re-add trip ID column on the server portal
Restore the 'ID' column (and showId attribute) on the server trip list.
2026-08-15 17:29:49 -04:00
Mathieu Moran a05d4a9a13 style: bake in 90% zoom scale via root font-size
Set html { font-size: 90% } so the whole UI (sidebar, typography, spacing)
renders at the ~90% browser-zoom look the owner prefers, consistently on
both the Pi and the remote server.
2026-08-15 17:21:50 -04:00
Mathieu Moran 36076034c4 style: compact data-list table rows so Pi and server match
Add an explicit .375rem vertical cell padding for .data-list tables. The
CSS/templates were already byte-identical across Pi and server, so this
makes the compact row height deterministic on both and rules out any
Bootstrap-default drift or stale-cache difference.
2026-08-15 17:13:40 -04:00
Mathieu Moran dcca46ec68 style: drop the ID column from the server trip table to match the Pi
The portal's trip list had an extra 'ID' column the Pi's list doesn't
have. Remove it (and its showId data attribute) so both tables render the
same columns: checkbox, Started, km, Time, Max, Odometer, delete.
2026-08-15 17:02:41 -04:00
Mathieu Moran ff49609f2a docs: note Pi checkbox batch trip delete in Phase 29 2026-08-15 16:56:28 -04:00
Mathieu Moran 99035e86ee feat: checkbox batch trip delete on the Pi (local-only)
- Pi history page gets a select checkbox column + 'Delete selected' button
  (mirrors the server UI)
- POST /api/trips/delete batch endpoint
- app_sql.delete_trips_batch() + deleted_trip_markers table so a later trip
  rebuild can't resurrect locally-deleted trips
- Deletion is local-only: raw tracking rows are kept and the remote server
  is never notified (it keeps its archival copy recomputed from uploaded rows)
2026-08-15 16:55:30 -04:00
Mathieu Moran c9d36cca33 docs: close BUG-23 + record fix in Phase 29
Move BUG-23 to Resolved with commit 78aea2d and verification (Pi trips
57 -> 49 after rebuild). Add matching entry to PLAN.md Phase 29.
2026-08-15 16:08:29 -04:00
Mathieu Moran 78aea2dc88 fix: Pi trip builder drops GPS lock-in drift trips (BUG-23)
Add the server's minimum-trip filter to build_trip_summaries() — duration
< 30s OR distance < 0.05km is rejected — so GPS lock-in drift no longer
spawns false trips on the Pi. Also sort normalized rows by datetime (the
server already orders by recorded_at ASC), fixing clock-rollback trip
boundaries. Bump TRIP_BUILD_VERSION to force a Pi-side rebuild.
2026-08-15 16:05:27 -04:00
Mathieu Moran 94dcffa2cb docs: add BUG-23 — Pi/server trip counts diverge (57 vs 10)
Root-caused the discrepancy by replicating the server's trip builder over
live data: 58 raw groups -> 51 after the server's duration/distance floor
(7 short trips dropped that the Pi keeps) -> 10 after skipping 41 deleted
trip markers. Documents the min-trip filter mismatch and the row-set
mismatch as the actual bugs.
2026-08-15 15:56:32 -04:00
Mathieu Moran 47993a876f fix: diagnose.sh DB checks — wrong path, column, and tool
- DB lives under db/sql/<account>_<car>.db, not the repo root (was -maxdepth 1)
- Pick the most recently modified DB (active account) instead of the first
  found, which was the stale TestUser_SubaruWRX.db
- Query UPLOADED=0 instead of sent=0 (column was renamed long ago)
- Use the venv Python's sqlite3 for queries — the sqlite3 CLI isn't installed
  on the Pi, so integrity/row-count checks were silently failing
2026-08-15 14:22:35 -04:00
Mathieu Moran 5170dbce62 chore: update diagnose.sh for dual-T3U WiFi and Android app
- Network section now checks wlan1 (in-car AP, 10.42.0.1), wlan2 (uplink),
  and reports wlan0 as retired fallback (was: first-wlan guess)
- Header + manual commands reflect current layout: Android companion app,
  remote server at yaris.ceaf.dev, AP/uplink nmcli profiles
2026-08-15 14:16:10 -04:00
Mathieu Moran 3808054577 docs: add BUG-22 commit ref 2026-08-14 23:05:12 -04:00
Mathieu Moran 90cfd7bd04 docs: close BUG-22 (smoothed GPS max verified) 2026-08-14 23:04:42 -04:00
Mathieu Moran be3b196c09 fix: BUG-22 bump TRIP_BUILD_VERSION to force Pi trip rebuild 2026-08-14 23:03:28 -04:00
Mathieu Moran a0be96dfaa fix: BUG-22 smooth GPS-derived speeds in trip max (trailing window) 2026-08-14 23:00:53 -04:00
Mathieu Moran d9314969d8 fix: BUG-22 include GPS-derived speeds in trip max (Pi + server) 2026-08-14 22:56:37 -04:00
Mathieu Moran aaa0bdabc4 docs: add BUG-21 commit ref 2026-08-14 22:37:33 -04:00
Mathieu Moran 7c8f27b84d docs: close BUG-21 (GPS-speed fallback verified) 2026-08-14 22:37:21 -04:00
Mathieu Moran 2fee2de357 fix: BUG-21 GPS-speed fallback in server route replay 2026-08-14 22:34:29 -04:00
Mathieu Moran 0fa6cc4988 docs: add BUG-21 — OBD speed dropout mid-drive, GPS-only replay 2026-08-14 22:22:16 -04:00
Mathieu Moran 09eca4d39f docs: add BUG-20 commit ref 2026-08-14 22:05:21 -04:00
Mathieu Moran 9af71e2395 docs: close BUG-20 (trip IDs renumbered 1..10, sequence clamped) 2026-08-14 22:05:09 -04:00
Mathieu Moran 01c7fdf0c4 fix: BUG-20 clamp trips sequence after recompute + renumber migration 2026-08-14 21:45:26 -04:00
Mathieu Moran 25f57603c6 feat: FEAT-14 dual T3U — wlan2 uplink, wlan1 AP, onboard wlan0 fallback 2026-08-14 21:32:30 -04:00
Mathieu Moran c7329186f4 docs: note SIM868 RTC set via AT+CCLK (BUG-18 follow-up) 2026-08-14 19:03:09 -04:00
Mathieu Moran dc3a3d866d docs: add commit refs for BUG-17/18 2026-08-14 18:35:21 -04:00
Mathieu Moran bf4f3d377e docs: close BUG-17 + BUG-18 — DS3231 RTC verified across power loss 2026-08-14 18:35:10 -04:00
Mathieu Moran bfdd1c2285 docs: BUG-18 DS3231 installed + working (I²C 0x68), pending power-cycle test 2026-08-14 18:05:17 -04:00
Mathieu Moran c2462356e1 Fix slow OBD value load on dashboard (BUG-19) 2026-08-13 16:57:16 -04:00
Mathieu Moran e873db918d Add clear DTC codes button to Pi DTC page (FEAT-15) 2026-08-13 16:40:15 -04:00
Mathieu Moran b39faadf58 docs: correct BUG-15 commit ref 2026-08-13 16:24:14 -04:00
Mathieu Moran ab798205a4 docs: close BUG-15 — phone-OS limitation (dual-role), workaround documented 2026-08-13 16:23:14 -04:00
Mathieu Moran c44026e511 docs: BUG-18 plan — DS3231 (I²C) + SIM868 CR1220 RTC backup 2026-08-13 16:13:51 -04:00
Mathieu Moran f94c50b2ee docs: close BUG-16 (fixed + verified), update Phase 29 status 2026-08-13 15:53:52 -04:00
Mathieu Moran f5f20c315b fix: trip builder handles NULL-GPS speed-only rows (BUG-16 follow-up)
Trips starting/ending on speed-only rows violated the trips.*GPSX NOT NULL
constraint. Use the first/last GPS-bearing row for start/end coordinates, and
skip a trip that never got any GPS fix (no location to record).
2026-08-13 15:52:07 -04:00
Mathieu Moran e5ac14e38b fix: persist car-connected flag so trip building works across reboots (BUG-16)
connect_obd() set _car_ever_connected without a global declaration, so the
module-level flag was never set and was_car_ever_connected() always returned
False — local trip building has been silently blocked since BUG-10 landed.
Also persist the flag to the settings table so a drive followed by a reboot
still builds trips, and clean up dead code in was_car_ever_connected().
2026-08-13 15:41:30 -04:00
Mathieu Moran e0ae179c38 docs: BUG-16/17/18 — Phase 29 road-test findings (trip missing, clock drift, no RTC) 2026-08-13 15:22:00 -04:00
Mathieu Moran 2172de6055 docs: add Phase 29 — round-2 road-test bug fixes (2026-08-13) 2026-08-13 15:11:53 -04:00
Mathieu Moran 87418ba3f8 docs: FEAT-14 — second T3U to replace onboard wlan0 (dual AC radios) 2026-08-13 15:04:11 -04:00
Mathieu Moran 4ee768174c docs: FEAT-13 — flush uploaded tracking rows from local DB (idea) 2026-08-13 15:03:00 -04:00
Mathieu Moran 3d49764855 feat: log OBD speed before GPS fix so rolling starts aren't lost
- _log_loop: when GPS has no fix but OBD speed > 1, write speed-only rows
  (NULL coordinates) instead of dropping the motion
- insert_tracking: accept None gps_x/gps_y -> NULL GPSX/GPSY
- app_trip: keep NULL-coord rows through normalize; _segment returns 0 for
  missing coords; route_points drops them (no position to draw)
- tests: speed-only rows build a trip with max speed + zero distance
- docs: FEAT-12 + readme note; server already filters NULL-GPS safely
2026-08-13 02:02:45 -04:00
Mathieu Moran fa8ae0001a ui: use redacted dashboard screenshots + restore GitHub footer link
- pics/ui.png regenerated from redacted desktop + mobile screenshots
- restore GitHub footer link in Pi + server base.html (accidentally removed)
2026-08-12 23:44:40 -04:00
Mathieu Moran 495e0a99f9 docs: refresh readme status + dashboard screenshots
- Project status -> Phase 27 done, Phase 28 (Android app) in progress
- Added Android companion app to feature list
- Regenerated pics/ui.png (mobile 390px + desktop 1280px dashboards)
2026-08-12 22:58:59 -04:00
Mathieu Moran 7f6d6c3a89 fix: show correct 'reach the Pi' URL per uplink mode + BUG-15
- Settings: when the Pi is on the phone's hotspot (mode phone), show the
  Pi's hotspot IP (http://<ip>) with an LTE-only hint instead of the AP URL
- BUG-15 documents the phone dual-role routing loop (host hotspot + connect
  to AP simultaneously breaks the uplink)
2026-08-12 22:38:31 -04:00
Mathieu Moran 51417abf75 docs: phone-hotspot requires LTE-only phone (no simultaneous AP client)
- FEAT-07: documented the WiFi-sharing/routing loop that breaks the Pi's
  uplink when the phone hosts the hotspot and is also on the Pi's AP
2026-08-12 22:32:07 -04:00
Mathieu Moran 26597888ba fix: use public DNS on phone-hotspot (carrier resolver fails .dev tunnel)
- yaris_uplink configure() keyfile: dns=8.8.8.8;1.1.1.1 + ignore-auto-dns=true
  so the Pi doesn't rely on the phone's DHCP DNS, which failed to resolve
  yaris.ceaf.dev (NameResolutionError) and broke uploads on the hotspot
- test asserts the DNS lines are written to the keyfile
2026-08-12 21:14:46 -04:00
Mathieu Moran 81c7ee25fd test: align suite with shipped behavior (WiFi swap, BUG-10 guard, odometer_baseline)
- test_app_trip + test_trip_sql: mock was_car_ever_connected() so trip
  building runs (BUG-10 guard suppresses trips until car ECU reached)
- test_app_settings: include odometer_baseline in valid payload + assert save
- test_yaris_uplink: Hotspot -> Hotspot-local; restore_fallback no longer
  activates AP (reports no_connection); wait timeout writes fallback_restored
- test_app_network: local_hotspot mode removed by WiFi swap -> wifi/no-internet
2026-08-12 19:14:07 -04:00