209 lines
50 KiB
Markdown
209 lines
50 KiB
Markdown
# Log
|
||
|
||
Append-only. `grep "^## \[" log.md | tail -5` for recent activity.
|
||
|
||
## [2026-07-15] setup | Wiki instantiated
|
||
|
||
Created schema (`CLAUDE.md`), `index.md`, `log.md`, and five seed pages built from repo knowledge: [[bmw-m57n-engine]], [[esp32-s3-touch-lcd-5b]], [[can-bus-integration]], [[dual-controller-architecture]], [[open-questions]]. Deleted Obsidian's default `Welcome.md`. Flagged: the firmware's CAN ID map looks like placeholders (two IDs exceed 11-bit range); `raw/ESP32-S3-Touch-LCD-5B.md` is an empty clip and needs re-clipping.
|
||
|
||
## [2026-07-15] ingest | Waveshare ESP32-S3-Touch-LCD-5 product wiki
|
||
|
||
Re-clipped `raw/ESP32-S3-Touch-LCD-5B.md` ingested → [[esp32-s3-touch-lcd-5b-waveshare-wiki]]. Answered two open questions: CAN transceiver is onboard (TJA1051T/3/1J, terminal block, 120 Ω termination switch off by default) and power is solved by the 7–36 V DC wide input (vehicle 12 V direct). New concern raised: operating temp spec is 0–65 °C, marginal for automotive. Updated [[esp32-s3-touch-lcd-5b]] and [[open-questions]]; added schematic PDF to sourcing wishlist.
|
||
|
||
## [2026-07-15] ingest | E60 VFL CAN codes spreadsheet + Listen_and_send_PID Arduino sketch
|
||
|
||
Two raw sources ingested. (1) `E60 VFL CAN-Bus Codes.xlsx` (community table, ~130 ID blocks from a real pre-facelift E60) → [[e60-vfl-can-codes-xlsx]]: independently confirms 0x1D0 coolant raw−48 (0x7A→74 °C) and 0x3B4 battery voltage (leaning 12-bit LE layout, factor ≈0.0147–0.015), adds 0x304 as a 2-byte gear-lever candidate (P=E3/R=C2/N=D1/M=C9, D value suspect), engine-running flag in 0x3B4 byte 3; contains no oil-temp or gearbox-temp rows. (2) `Listen_and_send_PID_009c` (Arduino MCP2515+ELM327, 2013) → [[listen-and-send-pid-arduino]]: transmits E46 cluster frames from OBD PID polling — filed as technique reference for a future diagnostic-request mode; no map changes. [[can-id-candidates]] updated: coolant now "very high" confidence; oil/gearbox temps flagged as weakest signals.
|
||
|
||
## [2026-07-15] query | Deep research: E60/E65 CAN IDs for M57N + ZF EGS
|
||
|
||
Deep-research workflow ran (interrupted twice by session task-loss on Windows; ~82 agents total, 95 claims, 30 adversarial verifications completed; synthesis done manually from the journal). Result: [[can-id-candidates]] — coolant/oil temp on **0x1D0** (raw−48, DDE, 100 ms; confirmed live on a real E60), gear on **0x1D2** (EGS, 200 ms, two generation dialects that likely reconcile), gearbox oil temp on **0x0B5** byte 7 (offset disputed 0 vs +40 — bench-critical), battery voltage on **0x3B4** (layout disputed 12-bit×0.015 vs 24-bit×0.001). Fault codes are NOT passively broadcast — require 0x6F1/0x612 diagnostic requests; firmware `fault_codes` field needs a design decision. Firmware's placeholder IDs contradicted by every source. Updated [[can-bus-integration]]; index updated. Cost note: bulk of tokens spent in the initial (pre-interruption) run; resumes replayed from cache.
|
||
|
||
## [2026-07-15] update | Donor and target vehicle confirmed by user
|
||
|
||
User confirmed: donor chassis is **E60/E65 (2003+)**, transmission is a **BMW auto with EGS on the CAN bus**, target vehicle is a **Nissan Patrol**. Created [[nissan-patrol-swap]]; updated [[bmw-m57n-engine]] (E46-era candidate IDs flagged as probably wrong generation) and [[open-questions]] (three questions moved to Answered). Next: web research for E60-generation PT-CAN broadcast IDs.
|
||
|
||
## [2026-07-16] ingest | Gear lever fully decoded & VERIFIED (0x1D2)
|
||
|
||
User captured steady byte values per lever detent (`raw/gear_box_can_revealings.csv`) → [[gear-box-can-revealings]]. **0x1D2 verified as the gear source**: byte0 = P `0xE1` / R `0xD2` / N `0xB4` / D `0x78` (all match documented codes exactly); byte0 can't split D from S/M (shared `0x78`) so byte4 does it (`0xF0` auto / `0xF1` Sport-Manual / `0xF2` downshift −); byte1 is a drive-gate flag (`0x0F`→`0x5F`); byte3 = rolling counter (confirms prediction). 0x0BA also tracks the lever but is messier (D/S-M collide) — don't use. Promoted 0x1D2 gear row to VERIFIED and rewrote the encoding-dispute section in [[can-id-candidates]]; updated index. Still open: actual engaged gear number (needs a drive capture) and the manual up-shift (+) value. Next: rewrite firmware gear map to 0x1D2 byte0 (+byte4).
|
||
|
||
## [2026-07-17] update | Driveline screen live; torque decoded; output-shaft scaling revised
|
||
|
||
Firmware flashed and running on the car. Built a hand-coded Driveline screen (src/, boot screen, swipe to reach Home) showing gear + coolant + gearbox temp + RPM + torque + turbine + output-shaft + status chips. Three findings from the user testing it: (1) **Torque decoded & verified** — on **0x0A8 TORQ_AVL** (available engine torque; user-identified the ID). User's Excel `(D2*256+D1)/32` is algebraically bits12-23 ×0.5; confirmed against the repo's 0x0A8 worked example (24 Nm, ALIV=8 in D1 low nibble), ~27-28 Nm at idle. Firmware masks D1's low nibble (alive counter, not torque) and sign-extends. Note 0x0AA TORQ_DVCH is the same layout but driver *demand* — identical at idle, diverges under load. → [[can-id-candidates]], [[driveline-speed-signals]]. (2) **Output-shaft scaling revised**: a direct Launch reference (output speed 128 rpm at our raw 1192) **contradicts the earlier ×0.125** (would predict 149) and points to ~0.107. One eyeballed cross-tool point, so not adopted — but 0.125 is downgraded, and the Launch now gives a direct rpm reference so calibration is just a multi-point sweep + linear fit. Firmware keeps raw counts. (3) Fixed a latent display bug: main.cpp showed DEFAULT_* placeholder temps/voltage as if measured; now gated on valid_flags. Ignition decoded from 0x3B4 byte2 (user: 0x00=on/0x09=off, tracks ignition not engine — both published sources wrong here).
|
||
|
||
## [2026-07-17] ingest | First drive capture — 0x0BA gear ladder verified, output-shaft scaling narrowed
|
||
|
||
`raw/log_20260717_145930.txt` (CANNY 5.3 Pico, 1,857 frames / ~34 s, filtered to 0x0BA + 0x1D2) → [[can-capture-2026-07-17-drive]]. **First capture with the vehicle actually moving.** Closes the inference left open yesterday: **`ST_GR_GRB` values 6/7/8/9/A observed directly** (238/77/93/127/94 frames) = 2nd–6th, so **`0x0BA` D0's low nibble is a complete gear source on its own** — P/R/N + 1st–6th, reverse included; `0x1D2` is now needed only for lever + mode. Also caught `ST_CCLT` (converter lockup) live — 422 frames "controlling" in the higher gears, which matters because a locked clutch makes turbine = engine exactly, so the engagement-ratio test needs to read it before trusting a ratio ≈ 1.0 at road speed. **Output shaft identification VERIFIED** (rises monotonically 1139→16702 across gears 1→6, zero whenever the output is held). **Scaling narrowed to ×0.125** `(unverified)`: implies a coherent 901→1872 rpm upshift schedule across five independent ratios, vs 7,200–15,000 rpm for raw-as-rpm against a ~4,500 redline. User confirmed the box is a **ZF 6HP26X** — same gearset as 6HP26 so the ratio table holds, and the xDrive output variant **dates the donor to E60/E61, not E65** (partly answers open Q#2). New question #11: was the transfer case retained? The X box measures output **upstream** of it, so a Patrol transfer case in the path would make road speed high/low-range dependent. Remaining assumption on the scaling: max-output-per-gear = upshift point — **one capture including `0x1A2` closes it** (turbine ÷ output = ratio directly). Updated [[driveline-speed-signals]], [[gear-box-can-revealings]], [[can-id-candidates]], [[nissan-patrol-swap]], [[open-questions]], index.
|
||
|
||
## [2026-07-17] ingest | E65_ReverseEngineering repo — both disputes resolved, driveline speeds discovered
|
||
|
||
User pointed at `HeinrichG-V12/E65_ReverseEngineering` (per-ID DBC-style docs, worked example on every page) → [[e65-reverse-engineering-repo]]. Highest-value source to date; combined with re-analysis of our own `raw/can-capture-2026-07-15-gearshift.csv` it closed most of the frontier. **Resolved**: gearbox oil temp = **raw − 40** (source example + our own gearbox-31 °C-vs-coolant-37 °C warm-up cross-check; my earlier "leaning offset 0" was wrong); battery = **12-bit LE × 0.015**; engine **was running** in the 2026-07-15 capture (`ST_ENGINE_RUN`=2 in 397/397) — **cold-start capture no longer needed**; RPM = `0x0AA` ×0.25 (679–684 idle). **Discovered**: `0x1A2` `RPM_GRB_TURB` turbine speed — a *physical* engagement proof (P/N ≈634/628 free-spinning vs D ≈70, R ≈0 stalled — textbook converter behaviour), plus `0x0BA` bits 20–39 output shaft (undocumented anywhere; zero in every stationary frame incl. engaged-in-D, non-zero once wheels turn), plus `ANG_ACPD` pedal % and `ST_CLCTR_V` cruise state. New page [[driveline-speed-signals]] — emphasized per user: **no DSC on this bus ⇒ output shaft is our only road-speed source**, hence the feedback variable for a future cruise-control PoC (safety envelope documented; actuation = transmitting torque requests, a different risk class from everything read-only so far). **Corrected three of my own 2026-07-16 claims**: `0x1D2` D1 is the *engaged gear* (not a "drive-gate flag" — it read 1 because the car was stationary); D4 `0xF2` is a persistent *Manual mode* (not a "downshift event" — it holds across gears 2–6); `0x0BA` is **not** to be dismissed (I'd read D7, an alive counter, instead of D0's `ST_GR_GRB` — which is the only source of engaged **reverse**, `0x1D2` D1 staying `0x0F` in R). Also: boost is **not** broadcast (`AIP_ENG` caps at 1108 hPa = barometric) — confirms the Launch must poll. Updated [[can-id-candidates]], [[gear-box-can-revealings]], [[open-questions]], index. Next: firmware pass over the whole verified map.
|
||
|
||
## [2026-07-16] ingest | First live CAN capture — research map CONFIRMED
|
||
|
||
First real dump off the swap's bus, taken with the board's **own new raw-frame logger** (`(repo)`; USB-CDC stream, serial mutex, ~486 frame/s, ~1.4% line loss). Raw filed at `raw/can-capture-2026-07-15-gearshift.csv` (20,596 frames) → [[can-capture-2026-07-15]]. Findings: 15 IDs live incl. **all four researched signal IDs** (0x1D0, 0x1D2, 0x0B5, 0x3B4) + bonus 0x0AA/0x0BA; firmware's placeholder IDs (0x4F/0x55/0x201/0x1001/0x101F) **verified absent**; researched-but-absent: 0x130/0x304/0x192. **0x1D0 b0** drifts 0x55→0x58 (coolant −48, ~37→40 °C); **0x1D0 b1 = 0xFF** (oil temp unpopulated). **0x1D2 gear encoding resolved**: DLC 6, byte0 whole-byte codes (0xE1=P, 0xB4=N, 0x78=D seen live). **0x3B4** at ~5 s rate but payload dormant (0xFF) — engine state unconfirmed. Updated [[can-id-candidates]], [[can-bus-integration]], [[esp32-s3-touch-lcd-5b]], [[open-questions]], index. Also corrected a firmware fact across pages: driver runs **`TWAI_MODE_NORMAL` (ACKs the bus), not LISTEN_ONLY**; TJA1051 is non-isolated → must share vehicle ground. Next: cold-start + confirmed-engine-running capture to lock coolant/battery scaling; use differential (per-position) captures for gear.
|
||
|
||
## [2026-09-21] update | .docs folder retired; UART spec moved to docs/; board photo ingested
|
||
|
||
The repo's `.docs/` folder was deleted (user decision). `CAN_BUS_INTEGRATION.md` documented the dead placeholder IDs and an external transceiver the board does not need — superseded by [[can-id-candidates]] and [[can-bus-integration]]. `UART_PROTOCOL.md` (the packet spec, shared with Controller B) moved to `docs/UART_PROTOCOL.md` as the single copy; Controller B's duplicate was removed. The annotated board photo moved to `raw/` → [[esp32-s3-touch-lcd-5-intro-photo]]: confirms the terminal-block order, that GPIO 44 exits only as the RS485 A/B pair, and that one 120 Ω switch serves both CAN and RS485. Root `CLAUDE.md` corrected: verified CAN ID list replaces the placeholders, `TWAI_MODE_NORMAL` replaces "LISTEN_ONLY", UART TX is GPIO 44 (was written as 43), dummy-data references removed.
|
||
|
||
**Missing source**: the schematic PDF (`ESP32-S3-Touch-LCD-5-Sch.pdf`) was in `.docs/` at the start of the 2026-09-21 session and was not on disk by the time of this cleanup (never git-tracked). Its net list was read earlier that session and is reflected in [[esp32-s3-touch-lcd-5b]]; re-download it into `raw/` — still on the sourcing wishlist in [[open-questions]].
|
||
|
||
Sibling wiki instantiated today at `../../ESP32-S3-LCD-1.3/wiki/` for Controller B (link, redundancy, gauge outputs). Cross-references from there use the text form `(sibling: 5B wiki → page)`.
|
||
|
||
## [2026-09-21] update | Link protocol v2: ESP-NOW second transport, gear/rpm/alerts on the wire, tunables console
|
||
|
||
Firmware (not yet committed): shared header v2 with typed DATA/CONFIG frames; `Tunables` module (gauge calibration + alert thresholds in NVS, `cfg show|set|override|reset` on the USB console); `EspNowLink` broadcasts every frame alongside UART1 (radio now stays in STA mode — WiFiManager's off no longer calls `WIFI_OFF`); CAN driver publishes lever + target/engaged gear nibbles and rpm, and evaluates coolant/gearbox/battery/cooling-demand alerts against the tunables. Bench-verified with Controller B: both transports alive, every frame deduplicated, `cfg override rpm 2000` drove B's tach output at 133.3 Hz. `docs/UART_PROTOCOL.md` rewritten for v2. [[dual-controller-architecture]] and index updated. Build note: IDF 5.5's ESP-NOW send callback takes `wifi_tx_info_t*`; and the two repos must not be built concurrently (shared penv).
|
||
|
||
## [2026-09-21] update | Gauge Tuning screen
|
||
|
||
New hand-coded screen `src/modules/tuning_screen.cpp` (swipe right from Driveline; left back to Driveline, right to Home): edits the Patrol gauge tunables and alert thresholds on the touchscreen, with a calibration override panel (RPM and duty sliders). Same `Tunables` path as the `cfg` console; `Tunables::setOverride()` added; NVS save now strips overrides. LVGL 8 note: no margin styles (`lv_obj_set_style_margin_*` does not exist), use padding or flex gaps.
|
||
|
||
## [2026-09-21] update | SquareLine Home screen removed; Driveline is the boot screen
|
||
|
||
User decision: the Home screen (three arc meters + battery) is not needed. Deleted `include/ui/screens/ui_Home_Screen.c/h`, its four image assets and `src/modules/meters_manager.*`; `ui_init()` now loads an empty placeholder and `display_init.cpp` shows the hand-coded Driveline screen; the generated Settings screen's right-swipe calls a new C entry point `app_show_driveline()`; Driveline swipes left to Settings and right to Gauge Tuning; Tuning swipes left back. Firmware flash shrank ~100 KB. If SquareLine re-exports a Home screen it must be deleted from the SquareLine project, not wired back in. Built and flashed.
|
||
|
||
## [2026-09-21] ingest | Google AI clipping "dde7m57 pids" — diagnostic-polling page created, 0x612 direction corrected
|
||
|
||
User clipped a Google AI Mode conversation into `Clippings/` (Obsidian Web Clipper default folder; schema updated to treat it like `raw/`) → [[google-ai-dde7m57-pids]]. Uncited generative summary, filed `(unverified)` throughout. Two things of value: the Ediabas result names for boost/rail/MAF/injection, and the user's own observation embedded in it — **`0x612` appears on the tapped bus while the Launch is connected**, proving diagnostic traffic reaches our tap. The clipping calls `0x612` the *tester request* and `0x6F2` the reply; that contradicts dieslg8 (real M57 code) and the BMW `0x6F1` → `0x600+address` convention — flagged, and the wiki keeps **tester `0x6F1` → DDE `0x612`** until our own capture shows the pair. Its `22 D1 xx` identifiers are uncited and must not be implemented from. Created the long-dangling [[obd-diagnostic-polling]] page (broadcast vs polled, addressing table, DDE6 vs DDE7.3 variant table, capture-with-Launch procedure, firmware implications: polling = transmitting on PT-CAN, a design decision). Side finding: the search term "dde7 m57" describes DDE7.3/EDC17CP09 on the later M57N2 (E90/E70); our E60/E61 donor with a 6HP26X should carry a DDE6/EDC16 — the Launch's ECU-identification page closes [[open-questions]] #2 in one screen. Updated [[bmw-m57n-engine]] (E60/E61, 6HP26X, stale firmware-placeholder warning removed), [[open-questions]] #2/#7 + wishlist, index.
|
||
|
||
## [2026-09-21] ingest | DWR's 335d Torque PID set — generic OBD-II route documented
|
||
|
||
User dropped `raw/BMW 335d.csv` and clipped page 1 of the e90post/6post thread "Extended BMW 335d PIDs for Torque" (DWR, 2009 335d = M57N2 on DDE7.3/EDC17CP09) → [[dwr-335d-torque-pids]]. **Every entry is a generic SAE J1979 mode-01 PID** (DWR says so in post 21; header `Auto` = `0x7DF`); nothing BMW-proprietary, nothing broadcast. Two revisions compared: the CSV in `raw/` is the corrected 2017 one (boost ×0.3125 = the J1979 0.03125 kPa/bit; fuel rate ×0.0938 lb/hr; post-#2's ×0.296 and ×5.64 were wrong); residual typos noted (`000031` for 0.0000305, one `+33`). Decoded his table back to SI with the J1979 byte positions. Consequence for us: the generic route is the **cheapest polling experiment** — one `01 00` supported-PID query on `0x7DF` tells whether our DDE answers EOBD on the PT-CAN and which PIDs it has — but the diesel-specific PIDs he relies on for boost (`70`), exhaust pressure (`73`), EGT (`78`), DPF (`7A`), NOx (`83`) are 2007+ J1979 additions an EDC16 almost certainly lacks `(unverified)`, and PID `0B` clips at 255 kPa. [[obd-diagnostic-polling]] restructured into Route A (generic, PID table, first test) and Route B (BMW `0x6F1`/`0x612`). Wishlist: DWR's Testo parameter list (post 175 of the Testo thread). Updated [[open-questions]] #7 + wishlist, index.
|
||
|
||
## [2026-09-21] update | `diag` console probe: Controller A can now send OBD-II requests
|
||
|
||
User decision: build the Route A probe. New module `src/modules/diag_probe.cpp` and a single sanctioned transmit function `CANDriver::transmit()` (single-shot frames, `CANTX,` console echo mirroring `CANRAW,`). Console: `diag pids` (mode-01 supported-PID bitmap scan, blocks 00/20/40…, per-responder summary with PID names), `diag pid <hex>` (one request, decoded for the Route A table incl. PID 70 boost and 78 EGT), `diag vin`, `diag ecu` (mode 09), `diag status`. ISO-TP single/first/consecutive frames reassembled with a `30 00 00` flow control to the responder's physical ID. Guards: one request in flight, refused for 3 s after any foreign tester frame (`0x7DF`/`0x7E0–7`/`0x6F1`), services 01 and 09 only. Console dispatch chained through `Tunables::setExtraCommandHandler()`. Built (1.49 MB) and flashed to COM11; bench check with no bus attached: `diag pids` sent `02 01 00` on `0x7DF`, the TWAI controller reported the single-shot frame un-ACKed, and the probe reported "not ACKed - no other node saw it" rather than blaming the ECU (the summary distinguishes un-ACKed from ACKed-but-silent). CAN-task warnings now take the serial lock so they no longer splice into `CANTX` lines. The wiki's "firmware never transmits" statements are now qualified on [[can-bus-integration]] and [[obd-diagnostic-polling]] (test-day procedure and the three possible outcomes written there). Root `CLAUDE.md` and `docs/UART_PROTOCOL.md` console section updated. Procedure rewritten as numbered steps with all four outcomes (un-ACKed / ACKed-silent / one responder / two responders) and the log-capture command.
|
||
|
||
## [2026-09-22] query | CANNY 5.3 pico vs ESP32 gauge drive - tach dead / temp frozen explained
|
||
|
||
First in-car test of the dual-controller rig: A reads the bus fine, B receives fine, but the Patrol tach never moves and the temp needle parks mid-scale ignoring the override slider. User disclosed the known-good reference: the same cluster works from a CANNY 5.3 pico using "Default Negative Output" (DIO mode, ch 7). Researched the CANNY docs (cannylogic.com/canny.ru): its channels are 12V-domain configurable-polarity switches - "negative output" = low-side sink to GND, letting the cluster's internal pull-up define the ~12V high level. Our ESP32 IO7/IO8 push-pull 3.3V output can't reach the tach's input threshold and biases the temp sender line to a fixed level. Not a firmware PWM polarity issue (50% square is its own inverse). Fix: logic-level N-MOSFET/NPN low-side stage per channel, temp duty law re-derived after (logic inverts). Filed [[canny-5-3-pico-gauge-drive]]; user corrected the channel to 8 (contact 4, the HR-PWM-capable one), matching the 5.3 pico docs. Index updated.
|
||
|
||
## [2026-09-22] query | Patrol cluster signal research - tach 2 ppr verified, temp sender curve, flutter plan
|
||
|
||
First day driving the real cluster from Controller B through the 2SK3069 low-side stage. Tach: needle tracked at double with ppr=4; user set ppr=2 -> tracks correctly (verified). 2 ppr matches an ECU-driven 4-cyl-style tach input (ZD30-era Y61 hint, unverified) rather than the TD42 alternator-W-terminal scheme. Temp gauge on IO8: needle flutters at temp_pwm_hz=1 kHz. Researched: stock Patrol sender is an NTC (2.1-2.9k @ 20C, 0.68-1k @ 50C, 236-260R @ 90C; patrol4x4/sensorgal), gauge is current-measuring; community PWM-gauge experience says flutter dies at ~40-50 kHz. Mitigation ladder filed: fixed-duty override test (data vs electrical), cfg set temp_hz 20000 (firmware clamp), then raise clamp / series drain resistor (~100-240R, also bounds full-on beyond-hot short) / gauge-side cap. Temp law must be re-derived after (FET inverts duty sense). Filed [[patrol-instrument-cluster]]; index updated. Earlier same day: [[canny-5-3-pico-gauge-drive]] hypothesis effectively confirmed by the needles moving through the FET; gauge-output disable bits found off during bench test (B console "disabled") - re-enabled via tuning screen.
|
||
|
||
## [2026-09-22] update | Temp gauge flutter resolved: temp_hz 1 kHz -> 20 kHz
|
||
|
||
User raised temp_pwm_hz to 20000 via the tuning screen; needle now steady at fixed override duty (verified). A confusing intermediate "gauge dead at 20 kHz" turned out to be a disconnected car-ground during rewiring - grounds first, then debug. [[patrol-instrument-cluster]] updated (flutter section marked resolved; drain series resistor kept as optional hardening). Remaining gauge work: re-derive temp_slope/temp_offset against the real needle through the FET stage (duty sense inverted vs the old direct-drive law).
|
||
|
||
## [2026-09-23] update | Tach steppy-needle saga resolved; trim -13; temp gauge stable
|
||
|
||
Full day of override-ramp experiments (ignition on, engine off; tools/tach_ramp.py + tach_ramp2.py drive A over serial). Four-layer diagnosis on B, all firmware in the 1.3 repo: (1) 5 Hz staircase -> slew limiter; (2) Arduino ledcChangeFrequency() re-inits the timer mid-period -> replaced LEDC with esp_timer toggle; (3) esp_timer task jitter from WiFi bursts -> hardware-timer ISR, phase-continuous; (4) the floor: the cluster counts pulses in ~150 rpm quanta (alternating +100/+200 needle steps on a clean ramp) -> random dither +/-45 rpm with an adaptive envelope that fades at steady rpm. Scale: cluster over-reads x1.20 low / x1.15 high (nonlinear); user settled tach_trim = -13%. Also found mid-session: user trim change via touchscreen had never registered (B stayed on cfg v99) - config state now verified over serial before every test. [[patrol-instrument-cluster]] rewritten with the saga; new tools: serial_logger.py, serial_cmd.py, tach_ramp*.py, dual_serial_capture.py. Status: RPM and temp gauges "fairly good", tach dither constants may get a future pass.
|
||
|
||
## [2026-09-23] ingest | Route A OBD probe - first live run: the DDE answers
|
||
|
||
The deferred test-day mission finally executed. `tools/diag_session.py` (new: one serial session, full console log into `wiki/raw/`) ran the `diag` sequence with the engine idling, Launch unplugged. Result: **Route A verified** - the DDE serves generic OBD-II mode 01 on `0x7E8`. Supported PIDs `01,04,05,0B,0C,0D,0F,10,1C,20,21`; rpm and coolant cross-checked live against the broadcast IDs (681 rpm / 64 C, matching). Boost PID `70` absent, mode 09 (VIN/ECU name) silent, MAF/IAT scalings implausible under J1979 (flagged unverified). PID 01: MIL off, **5 stored DTCs** - reading them needs mode 03 (probe extension or Launch). Probe counters clean: 15 req / 12 replies / 3 timeouts / 0 tx failures, no retry storms. Wrote sources/diag-route-a-2026-09-23.md; updated obd-diagnostic-polling (Route A section), open-questions #2 (OBD cannot identify the donor; EDC16 hints) and #7 (DTC path now concrete); raw logs diag-20260923-111737.log + diag-20260923-111851.log.
|
||
|
||
## [2026-09-23] ingest | Route B verified, DTCs read, donor identified (E60 530d)
|
||
|
||
Second session of the day, no Launch needed. Extended the diag probe (read-only: mode 03 `diag dtc`, BMW KWP `diag ident` / `diag bmw` on 0x6F1 with a 1A/18/21/22 service whitelist; MAX_PAYLOAD 64->384). Results, all on the tapped bus: (1) `diag dtc` read the 5 stored codes - P0101 MAF, P0113 IAT, P0500 VSS, P0545 EGT, P0030 O2 heater - all disconnected-sensor swap leftovers; the "implausible MAF/IAT scaling" flags from the morning are withdrawn (sensor faults). (2) BMW addressing verified live: 0x6F1 [12] -> reply on 0x612; the google-ai clipping's reversed claim is dead. (3) `1A 86` ident (65 B): part numbers 7799764/7799765/7793887, date 2006-03, VIN prefix WBANC92090 -> E60 530d (unverified decode); 22 F190 rejected -> KWP2000 not UDS -> DDE6/EDC16-era. 1A 90 (full VIN) always answers busyRepeatRequest to single-shots. Wrote sources/diag-route-b-2026-09-23.md; updated obd-diagnostic-polling (Route B verified, warning callout resolved), open-questions #2 (donor mostly identified - part-number lookup remains) and #7 (DTCs read), bmw-m57n-engine; raw logs diag-20260923-1241*/1242*/1243*/1245*/1246*.log. Firmware change in src/modules/diag_probe.cpp+.h (design rule kept: still the single transmit path, human-typed, single-shot).
|
||
|
||
## [2026-09-23] ingest | Identifier scans: 22 D1xx dead, 21 xx session-locked
|
||
|
||
Third session. Added `diag raw on|off` (CANRAW mute) and tools/diag_scan.py (identifier-space sweeper). Scanned `22 D100-D1FF`: every DID NRC 0x12 - the google-ai clipping identifiers are confirmed wrong for this DDE. Scanned `21 00-FF`: hits only at 21 20 (ASCII " O_269962 " - Bosch SW ref candidate), 21 06/08 (byte 0x05), 21 10 (empty); refusals 21 90 busy / 21 91 conditions-not-correct / 21 F0 security-access-denied show the measurement blocks are gated behind a diagnostic session (10 xx) and partly security access (27) - both outside the read-only whitelist by design. Conclusion: blind Route B probing is exhausted; live data needs the capture-with-Launch session. Updated sources/diag-route-b-2026-09-23.md and obd-diagnostic-polling; raw logs diagscan-22D1-*.log + diagscan-21-*.log.
|
||
|
||
## [2026-09-23] ingest | Launch capture: rail pressure decoded (service 2C)
|
||
|
||
The capture-with-Launch session, finally run (engine idling, our read-only serial_logger recording CANRAW while the Launch polled the DDE; user selected Rail Pressure actual, blipped to 2500 rpm for a second point). Result: live data on this DDE comes via KWP service 2C (dynamicallyDefineLocalIdentifier), NOT the 22 D1xx identifiers (which do not exist here) and not the session-gated 21 blocks the blind scan hit. Poll 2C 10 00 DF -> reply 6C 10 HHLL. Rail pressure VERIFIED two-point against the Launch display: bar = HHLL x 0.03 (idle raw 0x27EF=307 bar vs ~305 shown; 2500 rpm raw 0x3768=425 bar vs ~430 shown; transient spikes to 0x4E31~600 bar at tip-in). Recipe generalises to any Launch-visible value. Self-polling needs the connect-time session/define handshake (captured, but a transmit-on-the-bus design decision - deferred). Wrote sources/launch-capture-2026-09-23.md; updated obd-diagnostic-polling, open-questions #7, index; raw at serial-COM10-20260923-163511.log.
|
||
|
||
## [2026-09-23] lint | Clarify self-poll requirements; record Diagnostics-screen plan
|
||
|
||
Tightened the live-data findings after checking the full capture: the Launch used only 1A/2C/22/23 - NO 10 (session), 27 (security), or 3E (tester-present). So self-polling a 2C value (e.g. rail pressure) needs only the 2C 10 15E0 define + 2C 10 00DF poll, no secret; the earlier 21-block NRCs (0x22/0x33) are a different mechanism and do not gate 2C. Corrected the "needs session/define handshake" wording in launch-capture-2026-09-23.md and obd-diagnostic-polling. Recorded the design decision (user, 2026-09-23): active polling, if built, lives behind a password-protected Diagnostics screen (authorized-tech gate, manual, refuses while scan tool connected, read-oriented services) - open-questions #12, and a project memory so the capability is not re-researched later.
|
||
|
||
## [2026-09-26] build | OTA updates for Controller A
|
||
|
||
Repartitioned A to dual OTA slots (2 x 7.9 MB, SPIFFS dropped, nvs/otadata offsets kept - tunables v150 survived the one-time USB flash on COM10, verified). New src/modules/ota_update.cpp + include/config/ota_config.h: manual `ota status|check|install|rollback` console; HTTPS pull from the (now public) Gitea repo's latest release, ECDSA P-256 signature over "patrol-a|version|sha256" checked before download, image hashed while streaming, parked gate before download and before slot switch, rollback via verifyRollbackLater() override + 30 s confirm. TLS trusts ISRG Root X1 + Root YR (both verified against the server chain). CI: .gitea/workflows/firmware.yml (main -> rolling unsigned pre-release main-latest; v* tag -> signed release with manifest.txt). Decisions: manual trigger (future Diagnostics screen), public repos instead of a device token, Controller B to be updated by A over ESP-NOW (wire is one-way). Wrote pages/ota-updates.md. Pending: BMW_NISSAN_FIRMWARE_SIGNING_KEY repo secret, enable repo Actions, first v* tag to test end-to-end.
|
||
|
||
## [2026-09-26] build | OTA bring-up: Wi-Fi switch, ESP-NOW, memory
|
||
|
||
First CI runs green (main-latest built with version main-1ec93dc baked in; v0.1.0 signed release verified off-device: sha256 + signature + /releases/latest). Bring-up on the board found: (1) the Settings Wi-Fi switch has been LV_STATE_DISABLED since the first SquareLine export - re-enabled at runtime; (2) WiFi.disconnect(true) in the Wi-Fi task powered the radio off and killed ESP-NOW whenever Wi-Fi was used - fixed + ESP-NOW self-heal; (3) internal RAM has 15.9 KB free / 7.6 KB largest block with Wi-Fi up, so neither a TLS task stack nor mbedtls's internal-only buffers fit - OTA jobs now run in the loop task with mbedtls routed to PSRAM; `ota check` then worked on-device (signature verified on the board, 3.6 KB stack headroom). Added `wifi join|status|off` console. v0.1.0 must not be installed (pre-fix OTA can't run once installed). Updated pages/ota-updates.md, CLAUDE.md.
|
||
|
||
## [2026-09-26] verify | First OTA update end-to-end
|
||
|
||
Bench (home, both controllers on laptop USB, no car): A running USB-flashed `dev` ran `ota install` -> v0.1.1 from the signed CI release: 1.65 MB in ~60 s, verified, rebooted into app1, confirmed after 30 s (rollback cancelled). v0.1.1 then passed `ota check` ("up to date"), so OTA-from-OTA works. ota-updates.md marked VERIFIED.
|
||
|
||
## [2026-09-26] build | Display quick fixes (v0.1.2)
|
||
|
||
User reported heavy flicker during OTA and on Gauge Tuning taps, and laggy swipes. Diagnosis: flash and PSRAM share the MSPI cache; every flash write (OTA, or the NVS save on each Tuning tap) stalls the PSRAM framebuffer the RGB panel streams from, with no bounce buffer (ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE=0) - a known ESP32-S3 RGB issue. Swipes: every transition was LV_SCR_LOAD_ANIM_FADE_ON 100 ms - a full 1024x600 software re-render + alpha blend per frame. Also: the Debug "FPS" counts loop() passes (loop sleeps 100 ms), not rendering - real render FPS has never been measured. Quick fixes: instant screen switches; Tunables NVS writes deferred to 3 s idle / leaving Tuning; backlight off during OTA writes with before/after notices; firmware version label bottom-right on every screen. Real cure (bounce buffers + SPIRAM_XIP_FROM_PSRAM via custom_sdkconfig, needs internal RAM freed first) is planned as one measured bench session with open-questions #13.
|
||
|
||
## [2026-09-26] build | CI: no duplicate / docs-only builds; v0.1.3
|
||
|
||
v0.1.3 released (OTA download loop no longer aborts on a momentary TLS connected()==false; a forced reinstall had stalled at 570 B once, retry succeeded). Pushing main then the tag ran two identical builds, and every wiki commit rebuilt firmware: the workflow's new "Skip?" step makes a main push skip itself when its commit carries a v* tag or only touches wiki/** / *.md (in-job, so tag builds are never path-filtered). Release with `git push --follow-tags origin main`. Logic dry-run locally against the real remote (tagged/untagged/docs/mixed cases).
|
||
|
||
## [2026-09-27] lint | Session sweep: OTA status, board gotchas, Wi-Fi follow-ups
|
||
|
||
Brought the wiki in line with the whole 2026-09-26 session. ota-updates: status table of every cycle (dev->v0.1.1->v0.1.2, forced reinstall with the 570 B abort + clean failure path, v0.1.3 published but not installed), "installs are done by the running firmware" rule, flicker cause marked verified, Wi-Fi lost on reboot, console-without-reset recipe, B repo now public. esp32-s3-touch-lcd-5b: removed the unmeasured "~50 FPS" claim, USB serial is native CDC (not UART0) with the DTR/RTS reset gotcha, new lessons (flash-write flicker, fade stutter, internal RAM, never power the radio off, dual-slot partitions). dual-controller-architecture: ESP-NOW/Wi-Fi radio sharing + the disconnect(true) bug, B updates via A over ESP-NOW. open-questions #14: Wi-Fi UX redesign, remember network, delete v0.1.0 release. Pending user confirmations: dark-screen OTA shows no flicker; version label placement; instant swipes; Tuning taps.
|
||
|
||
## [2026-09-27] build | UI freeze + reboots fixed: LVGL pool to PSRAM, dangling SSID buttons, scans (v0.1.4)
|
||
|
||
User: swiping main<->Settings 3x froze the UI; random flickering dots on all screens. Board state while frozen: link task alive (UART+ESP-NOW), loop()/console dead -> LVGL lock held forever. Causes found: (1) LV_ASSERT_HANDLER `while(1);` spins inside the task holding the LVGL lock; (2) g_ssid_buttons[] dangled after SquareLine deleted the Settings screen -> lv_obj_del() on freed objects; (3) with (1) replaced by abort(), the next run rebooted after ~5 round trips and the decoded backtrace showed the real limit: lv_mem_buf_get() failing in a label draw - the 48 KB LVGL pool at 87% / 31% frag / 4.5 KB biggest block; (4) Wi-Fi scanned every 10 s on every screen, connected or not. Fixes: abort() handler, LV_EVENT_DELETE clears button slots, scanning only with the list on screen and not connected, LVGL pool 512 KB in PSRAM (frees 48 KB internal: internal free 16 -> 69 KB), `mem` console command. Verified: 10 Settings visits + 9 list rebuilds, pool peak 4%, 0 crashes; user: swipes better, no dots, no freeze, no reboot. Updated esp32-s3-touch-lcd-5b, open-questions #13/#14, ota-updates, CLAUDE.md.
|
||
|
||
## [2026-09-27] build | Hand-coded Settings + tabbed Gauge Tuning, remembered Wi-Fi, on-screen updates (v0.1.5)
|
||
|
||
User asked to refactor the Settings and Gauge Tuning UX, save the Wi-Fi connection, and add a check for updates. Decisions (user): sidebar Settings (Wi-Fi / Updates / System), install behind a confirm dialog (not a PIN), one remembered network, Tuning as tabs with big controls. SquareLine Settings screen deleted; WiFiManager rewritten without UI code (remembered network in NVS, auto-join at boot, scans only on request, one retry then back to the ESP-NOW channel, failure reasons on screen, password never logged - the old code printed it). Verified: auto-join after USB flash; user installed v0.1.4 then v0.1.5 from the screen ("All good"); v0.1.4 showed the dots again because it forgot the network after the restart and rescanned. Lessons: a plain `git push` doesn't send tags (v0.1.5 needed `git push origin v0.1.5`); esptool crashes mid-write when its progress bar goes to a cp1252 pipe. Updated ota-updates (status table, decision: Updates on Settings), open-questions #12/#14, esp32-s3-touch-lcd-5b, dual-controller-architecture, index.
|
||
|
||
## [2026-09-27] build | SquareLine decommissioned (v0.1.6); display plan recorded
|
||
|
||
`include/ui/` deleted (the SquareLine export: ui_init, placeholder screen, helpers, theme manager); its one live line, the dark LVGL theme, moved to `display_init.cpp`. User verified on `dev` (Wi-Fi forget/scan/rejoin, dialogs, keyboard) and installed v0.1.6 from the screen: "all good". SquareLine references left in `.pio/libdeps` are library examples, never compiled. Recorded the agreed display plan in open-questions #13 (baseline -> bounce buffers -> XIP_FROM_PSRAM on a branch), including why bounce buffers alone won't fix flash-write flicker, and why CAN / wire / ESP-NOW need no buffering (dropped-frame counter deferred by the user).
|
||
|
||
## [2026-09-26] ingest | Schematic re-downloaded; VOUT = H8 solder jumper (3V3 default / 5V)
|
||
|
||
User asked whether VOUT becomes 5 V by "unsoldering the resistor". Re-fetched `ESP32-S3-Touch-LCD-5-Sch.pdf` into `raw/` (closes the wishlist item) → [[esp32-s3-touch-lcd-5-schematic]]. Answer: VOUT is net `I2C_VCC`, picked by **`H8`, a 3-pad solder jumper** (1 = 3V3, 2 = VOUT, 3 = 5V; "the default paste is 3V3"): open the 1–2 bridge, bridge 2–3, never all three. The terminal-block I2C lines are level-shifted (NDC7002N, 4.7 k pull-ups to `I2C_VCC`) so they follow the choice. 5 V rail is a SY8293 buck rated 2 A ("run the line at 2A"), screen ≈550 mA, so ≈1 A spare for a load such as Controller B `(unverified estimate)`; not on USB power. Also indexed: SD SPI pins (IO11/12/13, CS EXIO4), CAN IO15/16 and RS485 IO43/44 confirmed. Updated [[esp32-s3-touch-lcd-5b]], [[open-questions]] wishlist, index.
|
||
|
||
## [2026-09-27] query | Open question 13 reviewed with the user: full fix committed, dots not gone
|
||
|
||
I argued for the cheap half only (baseline, 40-line draw buffer, time-boxed bounce buffers) and deferring XIP-from-PSRAM as cosmetic. User corrected two premises: the dots still appear occasionally on v0.1.6 (the "gone" claim on [[esp32-s3-touch-lcd-5b]] was too strong — now qualified), and a dark screen during OTA is a safety/UX defect (no feedback → driver may turn the ignition off mid-update). Decision (user): fix everything, all steps through XIP, bench time is no constraint; add an on-screen progress bar + "do not switch off" during updates. Recorded on [[open-questions]] #13. Also explained in plain terms why the coolant duty law still needs re-deriving through the FET stage ([[patrol-instrument-cluster]]); that remains the higher-priority car-facing item.
|
||
|
||
## [2026-09-27] build | `perf` console: the measuring stick for open question 13
|
||
|
||
Step 1 of the display plan. New `src/modules/perf_monitor.cpp`: LVGL `monitor_cb` (frames, ms/frame, px), a timer around `drawBitmap()` in the port's flush callback (ms per second spent writing the PSRAM framebuffer), `lv_timer_get_idle()`, FreeRTOS run-time stats for per-core idle (enabled in the Arduino core's sdkconfig), heap figures. `perf` / `perf on [sec]` / `perf off`; `PERF,` CSV lines sit next to `CANRAW` in a session log. Built and flashed COM14 (the 5B enumerates as COM14 today; the 1.3 as COM13). Idle baseline recorded on [[open-questions]] #13. Next: the provoke session (Wi-Fi scan, tuning save, OTA) with `perf on 1` logging, then bounce buffers.
|
||
|
||
## [2026-09-27] ingest | Display baseline session (perf log) — Driveline redraws for nothing, flash writes invisible to LVGL counters
|
||
|
||
`raw/perf-20260927-164620.log` (2.5 min, `perf on 1`, screens exercised: Settings, Wi-Fi scan + join, ota check, Gauge Tuning incl. hold-repeat and Simulation, ota install v0.1.6) → [[perf-baseline-2026-09-27]]. No markers were typed, timeline rebuilt from the board's log lines. Findings: (1) Driveline renders ~10 fps × 39 kpx × 30 ms with constant data — `tick()` calls `lv_label_set_text` unconditionally for rpm/torque/pedal/shaft every 100 ms `(repo)` → a third of core 1 and 51 ms/s of PSRAM writes for nothing; (2) screen switches are single 140–330 ms frames (the swipe lag) — a drawing cost, not a DMA one; (3) Simulation tab = 2 Mpx/s, 26 % of time copying to PSRAM, LVGL idle 9 %, core 1 idle 25 % — the load bounce-buffer refill must coexist with; (4) the 16:47:10 NVS save left no trace in the counters: flicker lives on the panel DMA side, so a vsync/refresh counter is needed to measure steps 2–3; (5) PERF stops during the 41 s OTA download (loop blocked). Heap flat. Plan on [[open-questions]] #13 amended (step 1b). User's visual observations for this run not recorded — asked.
|
||
|
||
## [2026-09-27] build | Step 1b: Driveline redraw stopped, panel vsync counter, timer-driven PERF
|
||
|
||
From the baseline findings. (1) `driveline_screen.cpp`: `setText()` / `setChip()` write a label or colour only when it differs — idle Driveline went from 9.7 fps, 30 ms/frame, 52 ms/s PSRAM copies, LVGL idle 68 %, core 1 idle 66 % to **0 fps, 0 ms/s, 96 %, 96 %** `(verified bench)`. (2) `perf` now counts the RGB panel's refresh-finished interrupt (attached in the port when tearing-avoidance is off): **≈24 vsync/s, longest gap 41.5 ms** = one frame at the 16 MHz pixel clock; a DMA restart will read as ≥ 83 ms — the first direct instrument for flicker and dots. (3) Periodic PERF moved from `loop()` to an esp_timer so it keeps reporting through the OTA download. Recorded on [[open-questions]] #13 and [[esp32-s3-touch-lcd-5b]]; root CLAUDE.md gained the "write only on change" rule for screen ticks. Next: provoke session with markers, then bounce buffers.
|
||
|
||
## [2026-09-27] ingest | Perf session with dots on screen + OTA: dots are sub-frame glitches, OTA kills 75 % of frames
|
||
|
||
`raw/perf-20260927-165903.log` → [[perf-dots-and-ota-2026-09-27]]. User started logging while dots/dashes were visible on the idle Driveline: LVGL 0 fps, cores 95 % idle, **panel 24–25 vsync/s with a 41.5 ms gap** — the frames were all on time, so the dots are FIFO underruns of a few pixels that the driver's restart-in-vsync never sees; only eyes can judge them, and bounce buffers (DMA from internal SRAM) are the designed cure. During `ota install` the panel fell to **4–8 vsync/s, gaps 290–747 ms** (332 ms = 8 frames recurring): each sector write disables the cache and starves the DMA — quantifies why the screen is unusable during updates and sets the step-3 target (24/s, 41.5 ms during install). Trim edits + deferred NVS save and `ota check` lost no frames. Still no markers typed — asked the user what was seen. Updated [[open-questions]] #13, [[esp32-s3-touch-lcd-5b]], index.
|
||
|
||
## [2026-09-27] lint | Correction: bounce buffers were on all along (10 lines, 21 MHz); the dots are late refills
|
||
|
||
While preparing step 2 I found the panel library reads `ESP_PANEL_BOARD_LCD_RGB_*` from its own `BOARD_WAVESHARE_ESP32_S3_TOUCH_LCD_5_B.h` — bounce buffer = width × 10, pixel clock 21 MHz (→ 24.1 Hz, matching the vsync counter exactly). The three `-DESP_PANEL_LCD_RGB_*` flags in `platformio.ini` were dead names; removed and replaced by a comment. Corrected [[esp32-s3-touch-lcd-5b]] (no more "no bounce buffer" / "16 MHz"), [[perf-dots-and-ota-2026-09-27]] (warning callout with the refined mechanism: a late 20 KB refill makes the DMA re-send the previous 10-line chunk → text-coloured dashes below each line, as in the user's photo `raw/dots-20260927_170136.jpg`), [[open-questions]] #13 (step A void; step 3 now covers dots and OTA). Contributing PSRAM traffic noted from the qio_opi sdkconfig: `CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y` (Wi-Fi buffers in PSRAM), 32 KB data cache / 32 B lines, `LCD_RGB_ISR_IRAM_SAFE` off, XIP off. pioarduino 55.03.33 supports `custom_sdkconfig` (rebuilds the core) — branch `display-xip` next.
|
||
|
||
## [2026-09-27] verify | Step 3 (XIP from PSRAM + IRAM-safe RGB ISR): OTA no longer blanks the panel
|
||
|
||
Branch `display-xip`: pioarduino `custom_sdkconfig` with `CONFIG_SPIRAM_XIP_FROM_PSRAM`/`FETCH_INSTRUCTIONS`/`RODATA` and `CONFIG_LCD_RGB_ISR_IRAM_SAFE`. First core rebuild (20 min) failed at the end on RainMaker/Insights embedding `https_server.crt`; dropping the unused components with `custom_component_remove` fixed it (rebuild ~3 min after). Flashed COM14, then a scripted `ota install force` with `perf on 1` → [[perf-xip-ota-2026-09-27]]: **24–25 vsync/s, 41.5 ms gap for the entire 33 s download** (stock core an hour earlier: 4–8/s, 290–747 ms). Flash-write blanking is fixed `(verified)`; step 4 (progress bar with the screen on) is unblocked. PSRAM free 6.6 → 4.9 MB, internal 66 → 63 KB, first full redraw 142 ms (no slow-down seen). Generated IDF files git-ignored. Open: dots by eye on the XIP build, swipe-lag comparison, CI must rebuild the core. Updated [[open-questions]] #13, [[esp32-s3-touch-lcd-5b]], index.
|
||
|
||
## [2026-09-27] build | Step 4: OTA keeps the screen on with a progress bar (branch display-xip)
|
||
|
||
`ota_update.cpp`: the full-screen notice gained an LVGL bar + percent label + amber "Do not switch off the ignition"; the download loop updates it per percent under a 50 ms LVGL try-lock; the backlight off/on around `writeImage()` is gone. Settings texts updated (confirm dialog, Updates note). Second forced install under `perf` → [[perf-xip-ota-2026-09-27]]: 24–25 panel frames/s and a 41.5 ms gap for the whole download, bar redrawing 2–3×/s. User confirmed on the screen: progress bar visible, no flicker. [[ota-updates]] rewritten for the lit screen; [[open-questions]] #13 step 4 done. Left: dots verdict by eye on the XIP build, CI core rebuild, merge + v0.1.7.
|
||
|
||
## [2026-09-27] release | v0.1.7: XIP from PSRAM, IRAM-safe panel refill, OTA progress bar, perf monitor, Driveline idle fix
|
||
|
||
User exercised the `display-xip` build (Wi-Fi scan, update check, install) and reported no flicker or other issues; decision: merge to main and tag **v0.1.7**. Contents since v0.1.6: core rebuilt with `CONFIG_SPIRAM_XIP_FROM_PSRAM` + `CONFIG_LCD_RGB_ISR_IRAM_SAFE` (pioarduino `custom_sdkconfig`, unused IDF components removed); OTA screen stays lit with a progress bar and "Do not switch off the ignition"; `perf` console + `tools/perf_session.py` (fps, PSRAM copy load, idle, panel vsync/gap); Driveline tick writes labels only on change; dead `ESP_PANEL_LCD_RGB_*` flags removed. Verified on the bench: 24–25 panel frames/s and a 41.5 ms gap throughout an OTA download (was 4–8/s). Open: dots in longer use (eyes only), CI core rebuild on the tag build. Pages: [[perf-baseline-2026-09-27]], [[perf-dots-and-ota-2026-09-27]], [[perf-xip-ota-2026-09-27]], [[ota-updates]], [[open-questions]] #13.
|
||
|
||
## [2026-09-27] build | v0.1.7 CI failure fixed: pioarduino core fork in the workflow, tag moved
|
||
|
||
Tag build died at the link step: `ModuleNotFoundError: No module named 'SCons.Tool.FortranCommon'`. Cause: CI installed upstream `platformio` via uv while the pioarduino platform pins its own SCons 4.8.1 (no Fortran tools) and, since `custom_sdkconfig`, the build runs through pioarduino's ESP-IDF path where the upstream core imports FortranCommon; locally the penv runs pioarduino's core fork (platform `penv_setup.py` pin v6.1.18), which never hit it — and v0.1.1–v0.1.6 never used that path. Workflow now installs the fork zip; documented in root CLAUDE.md and [[ota-updates]]. No release object existed for v0.1.7, so the tag was deleted on the remote and re-created on the fix commit, pushed with `--follow-tags`.
|
||
|
||
## [2026-09-27] verify | v0.1.7 published by CI after the core-fork fix
|
||
|
||
Second tag build (pioarduino core fork in the workflow) succeeded: release `v0.1.7` on Gitea at 18:28 with `firmware.bin` (1,722,464 B), `firmware.elf`, `manifest.txt` (target patrol-a, sha256 `a2949644…4c09`, ECDSA sig), built from `8e739fa`. Off-device check: downloaded binary's SHA-256 and size match the manifest. The bench board (dev build on COM14) could not `ota check` — Wi-Fi off and no saved network at that moment — so the first on-device install of v0.1.7 is the user's, from Settings → Updates. Expected on the board: "Version v0.1.7 is available", install with the screen lit and the progress bar, restart, `A v0.1.7` bottom-right; the Updates page then says up to date.
|
||
|
||
|
||
## [2026-09-27] update | Controller B updates from A's screen: link_peer, two-way maintenance frames, Updates page with two cards
|
||
|
||
Implemented A's half of B's OTA (design in B's wiki `controller-b-ota`). Shared `automotive_data.h` (+ new `link_secure.h`, both byte-identical in the two repos): `STATUS` 0x03 B → A, `PAIR` 0x04 A → B wire-only, `SECURE` 0x05 A → B (AES-256-GCM under the pairing key; inner `OTA_CMD` / `WIFI_CREDS`), `PACKET_MAX_PAYLOAD` 64 → 160, `PACKET_VERSION` unchanged (DATA/CONFIG bytes identical). New `src/modules/link_peer.cpp`: pairing key in NVS `linkpeer`, `link pair` sends the key ×3 over UART1 only (`UARTManager::sendWire()`), B's STATUS kept + logged, automatic push of the remembered Wi-Fi network to B (hash-compared, ≥ 15 s apart, FORGET when A forgets), `requestCheck/requestInstall` for the screen behind `Ota::isParked()` + A on Wi-Fi. `EspNowLink` gained a receive callback (IDF 5.5 `esp_now_recv_info_t`) and `sendTo()`; `WiFiManager::getSavedCredentials()` (for LinkPeer only, never printed). Settings → Updates rebuilt as two cards (Controller A / Controller B) that fit the 484 px page without scrolling. Bench: B heard within seconds (`link status`: MAC, `dev`, heap 234 KB), refusals correct; `link pair` cannot be confirmed because **no wire is connected on the bench** (B reports `uart silent`). Build notes: `pio` from PowerShell only (idf_tools refuses MSYS); first build after the B project reinstalls Arduino 3.3.3 and may fail once with a `TypeError` - rerun.
|
||
|
||
## [2026-09-27] verify | Controller B updated from A's console, end to end (details in B's wiki log)
|
||
|
||
With the wire connected: pairing, credential push, check and install of B's first signed release `v0.1.0` all worked from A's `link` console; B rebooted and confirmed. A's side needed one cosmetic fix (missing separator in the "Controller B update: failed - <reason>" log line), rebuilt and flashed COM14. Left for the user: tap Check / Install on the Controller B card of Settings → Updates on the next B release and watch B's progress line.
|
||
|
||
## [2026-09-27] update | Wi-Fi chip and blinking alert banner on every screen; Driveline reds
|
||
|
||
User: show Wi-Fi on every screen (top-right) and give a sense of urgency when a threshold is crossed. New `status_overlay.cpp` on `lv_layer_top()`: Wi-Fi chip (fixed 150 px, LONG_DOT) top-right on all three screens - the shared header's back button moved 160 px left to make room; alert banner top-centre, red blinking at 2 Hz (colour toggle from tick, no lv_anim) naming the value (`COOLANT 104 °C HOT`, `GEARBOX OIL ...`, `GEAR MISMATCH`, `BATTERY 11.20 V LOW`), steady amber for `GEARBOX COOLING`; hidden with CAN off / ignition off. Driveline: chips row moved to y 60, crossed values and their titles go red (amber for cooling), gear mismatch turns the hero ring and gear letter red and the separate mismatch label is gone. Built and flashed COM14. Untested visually and untestable on the bench (alerts need CAN frames) - user to look at the car.
|