KPro, checked against KPro Manager on the bench (7267 rpm capture; a
test replays that frame):
- TPS (raw - 25) / 2.04 (68 %), IGN (raw - 128) / 2 (5 deg), short trim
(raw - 128) / 1.28, injector 16-bit LE at 11-12.
- BAT is byte 51 / 10 (11.40 V) and PA byte 53 kPa (95.0); the PDF table
had them at 52 / 51.
- SW1/SW2 bits are listed lowest-first: FLR bit6, FANC bit7, VTP bit0,
VTS bit1, MIL bit3 (VTEC Out no longer shows VTP).
S300: the same TPS formula matches the USB tool (31 % at raw ~88).
RPM glitch filter: frames whose RPM jumps more than an engine can are
dropped (KPro bench crank fault P0336 sent ~300 rpm frames between real
ones); a real change is accepted once 6 of the last 10 readings agree.
Dropped count shown on the Debug screen.
Connecting from Settings now replaces the whole navigation stack, so no
stale dashboard is left underneath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked against the USB tool on the bench (3210 rpm):
- O2: raw x 5/256 V (raw 195 -> 3.81 V, as the USB tool shows).
- New derived sensor: injector duty = INJ ms x RPM / 1200
(16.67 ms @ 3210 rpm -> 44 %, as the USB tool shows).
- Default dashboard flags: MIL, Fuel Pump, FAN Out, VTEC Out (the
requirement's "FuelCut" is the fuel pump flag on the S300).
- Log one raw frame (bytes 0-63) every 5 s so USB-tool readings can be
matched to bytes; INJ, IGN, TPS, MIL, AF and PA still need that check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rewrite S300 and KPro DTC tables from hvbt_protocol.pdf (the previous
tables did not match the PDF; e.g. ERR01.6 is P0350 IGM, not P1361).
- Clear DTC: the adapter never echoes the documented ack, but the ECU does
clear (bench: 3 of 4 codes cleared, P0350 re-set at once as an active
fault). Judge success from the live ERR bytes; wait only 0.6 s for the
ack so polling resumes, and report "N of M cleared".
- Set the ECU protocol from the adapter name (S300/KPro) on connect; a
stale KPro setting made an S300 adapter look unresponsive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client reported crashes, wrong/frozen data and that the app floods the
adapter MCU. See docs/FIX_2026-10-12.md for the full analysis.
- Poller: strictly one request outstanding; next request only after a valid
128-byte reply or a 500 ms timeout, then a quiet period + buffer flush.
Default 100 ms (10 Hz), minimum 80 ms. DTC clear/probe share the same lock.
- BtNotifier: filter the adapter's default (no-ECU-data) frame instead of
holding last values; EcuDataStatus + status banner; auto-reconnect on link
loss, stalls or long default-only runs (rate-limited). A reconnect still in
flight when the user disconnects is discarded.
- S300 offsets corrected by column counting (trims, PA, ERR00-03, Eth, SW5,
AF); INJ/AIN little-endian; fan = SW5 FANC only. Default-frame detection
requires bytes 0-16 and 32-36.
- KPro RPM/MAP2/AIN little-endian (RPM still needs a bench check).
- Crash hardening: zone/Flutter/platform error handlers to an in-app log
(copyable from Debug); permissions requested before listing devices.
- Remove temporary debug prints; graph redraws live; polling options
100-300 ms, persisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Work that was previously only in the local working tree:
- Rename fuelCut -> fuelPump (SW2 bit2, active-low, live-confirmed)
- ECT/IAT/BAT moved to live-confirmed offsets 33/34/36
- S300 template-frame detection with hold-last-good logic
- Persist ECU type in SharedPreferences; drop per-connect protocol dialog
- Official-protocol probe and DTC clear on the debug/DTC screens
- Sanity clamp for multi-byte fields; scrollable vertical dashboard
- docs/HANDOFF.md
Includes temporary [DBG]/[KDBG] prints, removed in the next commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Implemented RawFrameDebugScreen for displaying ECU frame data and diagnostics.
- Created DtcScreen to show active Diagnostic Trouble Codes (DTCs) with detailed descriptions.
- Added DtcRow widget for individual DTC representation.
- Introduced GraphScreen for visualizing sensor data over time with customizable time windows.
- Developed SensorListScreen to display available sensors and their current values.
- Enhanced SettingsScreen with options for Bluetooth connection, ECU protocol selection, polling interval, and theme settings.
- Added AppColors and AppTheme for consistent theming across the application.
- Implemented BtStatusChip to show Bluetooth connection status in the app bar.
- Created RecordFab for starting and stopping data recording sessions.