Consolidate obd_reader.py onto obdcore (single source of truth) #1

Open
opened 2026-06-30 14:59:30 -04:00 by claude · 0 comments

Problem

The terminal tool obd_reader.py still carries its own copy of: the ELM327 link logic, the Ford 6.0 PID table (FORD_60_PIDS), DTC decode/parse, and the DTC database — all duplicated from the now-canonical obdcore package (link.py, profile.py / registry.py, store.py). Two sources of truth drift over time.

Goal

Migrate obd_reader.py to import from obdcore so the terminal tool and the GUI share one source of truth and the vehicle-profile system.

Acceptance

  • obd_reader.py uses obdcore.ElmLink + a loaded Profile (default profiles/ford-6.0-powerstroke.json) instead of its hardcoded ELM/FORD_60_PIDS/DTC tables.
  • All terminal modes still work unchanged: --crank, --dash [crank|vitals|full], --ford, --pid, --scan, --clear, --watch.
  • No behavior change for the user; the curses/ANSI dashboards keep working.

Notes

Medium priority — not blocking; the duplication is currently stable and correct (formulas already match). Do as an isolated-worktree task. Touches only obd_reader.py (+ possibly small additive helpers in obdcore).

## Problem The terminal tool `obd_reader.py` still carries its own copy of: the ELM327 link logic, the Ford 6.0 PID table (`FORD_60_PIDS`), DTC decode/parse, and the DTC database — all duplicated from the now-canonical `obdcore` package (`link.py`, `profile.py` / `registry.py`, `store.py`). Two sources of truth drift over time. ## Goal Migrate `obd_reader.py` to import from `obdcore` so the terminal tool and the GUI share one source of truth and the vehicle-profile system. ## Acceptance - `obd_reader.py` uses `obdcore.ElmLink` + a loaded `Profile` (default `profiles/ford-6.0-powerstroke.json`) instead of its hardcoded `ELM`/`FORD_60_PIDS`/DTC tables. - All terminal modes still work unchanged: `--crank`, `--dash [crank|vitals|full]`, `--ford`, `--pid`, `--scan`, `--clear`, `--watch`. - No behavior change for the user; the curses/ANSI dashboards keep working. ## Notes Medium priority — not blocking; the duplication is currently stable and correct (formulas already match). Do as an isolated-worktree task. Touches only `obd_reader.py` (+ possibly small additive helpers in `obdcore`).
claude added the P2tech-debtai-ready labels 2026-06-30 14:59:30 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: justin/obdash#1