Add clear DTC codes button to Pi DTC page (FEAT-15)
This commit is contained in:
+15
@@ -34,6 +34,7 @@ dedicated PLAN.md phase (or fold it into the relevant existing work) and mark it
|
||||
| FEAT-12 | `SHIPPED` | Log OBD speed before GPS fix (rolling-start capture) | Phase 27 |
|
||||
| FEAT-13 | `IDEA` | Flush uploaded tracking rows from local DB | unassigned |
|
||||
| FEAT-14 | `IDEA` | Second T3U to replace onboard wlan0 (dual AC radios) | unassigned |
|
||||
| FEAT-15 | `SHIPPED` | Clear DTC codes from the DTC page | Phase 29 |
|
||||
|
||||
---
|
||||
|
||||
@@ -275,3 +276,17 @@ dedicated PLAN.md phase (or fold it into the relevant existing work) and mark it
|
||||
- The rtl88x2bu driver is already built; a second identical dongle should be plug-and-play.
|
||||
|
||||
|
||||
### FEAT-15 — Clear DTC codes from the DTC page
|
||||
- **Status**: `SHIPPED` 2026-08-13
|
||||
- **Area**: `modules/app_obd.py`, `modules/app_sql.py`, `app.py`, `templates/dtc.html`
|
||||
- **Phase**: Phase 29
|
||||
- **What**: The Pi `/dtc` page now has a **Clear codes** button that sends OBD mode 04
|
||||
(`CLEAR_DTC`) to the ECU and resets both the live and persisted DTC state, so codes can be
|
||||
cleared right after a repair without a separate scanner. If the adapter isn't connected to
|
||||
the car ECU it reports "not connected" (409), and if a fault is still physically present the
|
||||
codes legitimately re-appear on the next sensor poll.
|
||||
- **Files**: `clear_dtc_codes()` in `app_obd.py` (mode 04 + in-memory/socket reset),
|
||||
`clear_dtc_state()` in `app_sql.py` (marks active rows `IS_SET=0`, resets `dtc_mil`),
|
||||
`POST /api/dtc/clear` in `app.py`, and the button + confirm/status JS in `templates/dtc.html`.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user