Commit Graph

13 Commits

Author SHA1 Message Date
justin 45691334e1 registry: add remaining documented Ford 6.0 PIDs (20 -> 27)
The initial registry was a curated core; add the rest of the PIDs the
ford-60-pid-hunt workflow surfaced, with honest confidence tags:
- doc:       VGT duty (096D), Fan speed (099F)
- tentative: Injection timing (09CC, *10/64 not /10), PCM battery (1172),
             fuel-pump duty (1672), fuel level (16C1, uncalibrated),
             mass-fuel-desired (1411, raw only -- no verified GPH formula)
Add VGT to the driving preset. Tests still pass.

Tier reminder: 'verified' = multi-source/standard or truck-confirmed; the
on-truck-confirmed subset remains ICP/EBP/MAP/BARO/EOT/gear/TSS + FICM_M.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-30 14:19:57 -04:00
justin 4589904b97 P1: PySide6 + pyqtgraph GUI shell (PID browser + live overlay plot)
First graphical frontend on obdcore. Cross-platform (Win/mac/Linux).

- gui/controller.py: owns link/registry/store/scheduler; subscribe == poll ==
  plot; per-PID rates (ICP/FICM/RPM fast); optional CSV recording.
- gui/main.py: connection bar (port dropdown via find_ports, baud, Mock,
  connect), left PID browser grouped by system with live values + confidence
  badges + checkboxes, central pyqtgraph overlay plot with legend, Normalize
  (% of range) toggle for mixed-scale PIDs, Crank/Driving/Vitals presets,
  10Hz refresh reading the store off the acquisition thread.
- run_gui.py launcher; requirements-gui.txt.
- store.py: lock Channel push/series (GUI reads while scheduler writes).
- docs/gui-p1-preview.png: validated render (mock crank, ICP ramp to 540).

Validated headless (offscreen Qt): connect(mock) -> crank preset -> ICP
streams past 500 -> normalize -> uncheck removes curve -> clean disconnect.
obdcore tests still pass after the locking change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-30 14:13:49 -04:00
justin 01de18a568 Document cross-platform support (Windows/macOS/Linux)
The stack is portable by construction: PySide6/pyqtgraph/numpy/pyserial all
ship wheels for all three OSes (incl. Apple Silicon); obdcore has no
OS-specific code; the terminal dashboard's only platform code is guarded
(os.name=='nt' vs termios for POSIX = macOS+Linux).

- ARCHITECTURE.md: Cross-platform section -- portability rules (list_ports
  only, pathlib, no shelling out, platformdirs for config), the three per-OS
  seams (CH340 driver, PyInstaller per-OS packaging, Gatekeeper/SmartScreen).
- README: Setup now covers Windows (CH341SER), macOS (CH34xVCPDriver), Linux
  (in-kernel ch341 + dialout group) instead of Windows-only.

No code changes; obdcore tests still pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-30 14:06:49 -04:00
justin 6bee9c0d7f Scaffold obdcore (headless acquisition core) + ARCHITECTURE.md
Foundation for the PySide6 + pyqtgraph Windows GUI, shared with the terminal
tool. Pure data/IO -- no Qt, no curses.

obdcore/
  link.py      ElmLink   -- ELM327 serial (Mode-01/22, ATRV, DTC read/clear)
  mock.py      MockLink  -- synthetic crank for tests + GUI dev (no truck)
  registry.py  PidRegistry (verified Ford 6.0 PIDs + confidence) + DtcDatabase
  scheduler.py PollScheduler -- prioritized round-robin polling, dead-PID park,
               derived channels; tick() is fake-clock test-drivable
  store.py     TimeSeriesStore (ring buffers + min/max) + CsvRecorder/replay

Design centers on the ELM327 bandwidth limit (~7-15 reads/sec): the active
view subscribes PIDs at chosen rates; acquisition runs off the UI thread;
the GUI only reads the store. FICM_M (09D0) promoted to verified after the
2026-06-30 on-truck crank read (48.0V, intermittent).

tests/test_obdcore.py: decoders vs real truck bytes, crank ramp + peak,
derived BOOST, dead-PID park/revive, record/replay roundtrip -- all pass.

ARCHITECTURE.md: layers, data model, GUI plan, 6.0 stock-PID limits
(no EGT/oil-PSI), feature backlog, P0-P5 roadmap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-30 13:41:24 -04:00
justin 6eb449f354 diagnostics: confirm ICP bleed-off via --crank (peak 376 psi)
Direct on-truck measurement with the verified 1446 ICP PID: peak
cranking ICP 376 psi vs the ~500 psi firing threshold.  FICM Main min
48.0 V (healthy), battery min 10.3 V (adequate).  Diagnosis empirically
confirmed: high-pressure oil bleeds off during cranking.  376 psi is
"almost there" not zero, which fits a partial leak (IPR seat / oil rail
O-rings / partial STC crack) rather than a fully blown STC fitting.

- Capture the --crank output in crank-test-2026-06-30.txt
- Add EMPIRICAL CONFIRMATION section to diagnostics README
- Update handoff "resume at the truck" to lead with physical inspection
  (IPR -> STC -> oil rail O-rings), since the OBD-side diagnosis is done

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-30 13:03:45 -04:00
justin 899a82e596 handoff: catch up to verified PID set + --crank/--dash modes
Replaces the "PIDs are TENTATIVE" framing with pointers to the verified
Ford 6.0 PID table and pid-research.md.  Updates the "resume" section
to make --crank the top action at the truck, with --pid probes for the
09xx FICM family that was outside the original brute-scan window.
Open-follow-ups condensed to the live items from pid-research §5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-30 11:40:57 -04:00
justin a9b2e133c0 Add dedicated --crank monitor for no-start diagnosis
Big ICP readout focused on the cranking scenario:
- Wide ICP bar with the 500-psi firing threshold marked (|)
- Rolling ASCII trace chart of the ICP build-up (10 rows; renders anywhere,
  no unicode) -- clearly shows ICP climbing above/below the 500 firing line
- Peak-hold (the crank's max ICP, the money number) + pass/fail verdict
- FICM main / battery / RPM secondaries with sag (min) tracking
- --dash-log writes a CSV (t,icp,ficm,batt,rpm) while you watch
- On exit prints peak ICP + verdict (reached 500 / suspect oil bleed-off)

Validated end-to-end via a mock crank: ICP ramp past 500, peak capture,
battery-sag capture, trace resolution, CSV logging, clean terminal restore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-30 09:15:14 -04:00
justin c94caefd50 Add real-time live gauge dashboard (--dash)
In-place updating CLI dashboard for watching data while cranking/running.
Pure-ANSI (no new deps; works on Windows 10+ terminals).

- Color-coded gauges (green/yellow/red) by no-start thresholds
- Live min/max per gauge -> captures PEAK ICP during a crank
- ASCII bars for ICP and FICM main voltage
- Presets: crank (ICP/FICM/batt/RPM, fastest), vitals (default), full
- Dead-PID auto-skip keeps refresh rate up when 09xx FICM PIDs no-respond
- --dash-log PATH writes a CSV while you watch (streaming log preserved)
- q=quit, r=reset min/max; cross-platform non-blocking key input

Validated: render + decoders vs the truck's real scan bytes, and the full
dashboard() loop via a mock ELM (ICP climb across the 500psi firing
threshold, peak capture, battery-sag capture, CSV logging, clean exit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-29 23:27:29 -04:00
justin 36b233f02c Correct Ford 6.0 Mode-22 PID table from workflow research
The old 12xx PIDs (1209/1228/120B/...) were wrong addresses -- that's why
they returned 'no response' on the truck, NOT a bus/gateway problem. The real
Ford-enhanced DIDs are in the 09xx/14xx/16xx families. Confirmed by the truck's
own brute-scan: 1446=ICP, 1445=EBP, 1440=MAP, 1442=BARO, 1310=EOT, 11B3=gear,
11B4=TSS all decode to sane on-vehicle values.

- Rewrite FORD_60_PIDS with corrected addresses + [VERIFIED]/[DOC]/[TENTATIVE] tags
- FICM voltages -> 09D0/09CF/09CE/09CD (09D0 Main = the ~48V no-start metric)
- ICP=1446 *0.57, IPR=1434, ICP_V=16AD; EOT scaling fixed to /100-40
- watch --ford now streams 09D0/09CF/1446/1434 (FICM main V + ICP during crank)
- Add diagnostics/2026-06-29-no-start/pid-research.md (full workflow findings)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-29 22:29:46 -04:00
justin 2fe3f1100e diagnostics: FICM healthy (>48V), ether-start signature narrows to ICP path
- FICM measured >48V on M during cranking AND key-ON. Healthy. Removed
  as a suspect.
- Truck starts cleanly on starting fluid (ether) every time, then idles
  and runs normally until shut off -- then needs ether again, even when
  warm. This is a textbook signature for high-pressure oil (ICP) bleed
  during cranking that the HPOP can outrun at running RPM.
- Updated working hypothesis to focus on STC fitting / oil rail O-rings /
  HPOP / IPR. Compression, FICM, CMP/CKP, fuel supply all confirmed good
  by virtue of the engine running cleanly once started.
- Reordered open items to put visual inspection of valve covers + STC
  fitting first.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-29 21:51:58 -04:00
justin e15e22a825 Add --watch/--ford/--pid/--scan modes + 2026-06-29 session diagnostics
obd_reader.py:
- Mode 22 plumbing: ELM.mode22() sends a 16-bit PID request, parses both
  positive (62 ..) and negative (7F 22 NRC) responses.
- --ford runs a small TENTATIVE table of community-sourced Ford 6.0 PIDs
  (ICP/IPR/FICM/EBP/EOT). All printed with raw bytes for verification.
- --pid XXXX probes a single PID and prints multiple candidate decodings
  (u8, u16, mV, temp, duty) so we can eyeball the right scaling.
- --watch [N] streams ATRV + module voltage (PID 0142) for N seconds.
  Designed for capturing voltage sag during cranking.
- --scan AAAA-BBBB brute-force scans Mode-22 PIDs with --scan-log PATH
  for output. Uses fast ELM timing (ATAT2, ATST19) for ~3.5 PIDs/sec.

diagnostics/2026-06-29-no-start/:
- Captured cranking voltage trace, full Mode-22 scan (1000-14FF -> 46
  hits), and a session writeup. Working hypothesis: not batteries, not
  fuel -- ICP / FICM / CMP. FICM meter test still owed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-29 21:49:18 -04:00
justin 8bdb77cf53 Add handoff.md for in-cab pickup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-29 19:18:09 -04:00
justin 0491d37a2e ford-obd: ELM327 OBD-II reader + 6.0 Power Stroke no-start triage
Read stored/pending/permanent DTCs, decode with 6.0-relevant codes flagged,
guarded mode-04 clear (--clear), key live PIDs + battery voltage, and a
6.0 no-start triage checklist. Tested against a CH340 ELM327 v1.5 adapter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-29 19:17:35 -04:00