Commit Graph

65 Commits

Author SHA1 Message Date
julian 9bfcd99dee Settings: diff-lock row's switch box aligned START - END collapsed its content width and clipped the Inverted switch
Firmware / build (push) Successful in 6m49s
v0.1.13
2026-09-29 15:41:19 +02:00
julian b431cdfa16 Diff locks: per-board polarity ('Inverted' switch in the Settings row, 'difflock invert on|off', NVS difflock_inv) - in the car the lock wires carry 12 V while unlocked
Firmware / build (push) Successful in 7m6s
2026-09-29 15:18:23 +02:00
julian 0254bf19e9 Diff-lock drawing: wheelbase -20 %, same square tyres all round, locked axle's tyres filled, no caption text
Firmware / build (push) Successful in 7m5s
v0.1.12
2026-09-29 10:53:48 +02:00
julian 01f7501ae7 Diff locks on the Driveline: chassis top view after the user's sketch (steered front wheels, prop shaft, rear axle); locked axle amber with an X on its diff, front-only red, caption
Firmware / build (push) Successful in 6m59s
v0.1.11
2026-09-29 10:30:46 +02:00
julian 31ca44187e Diff-lock inputs: DI0 rear / DI1 front via CH422G EXIO0/EXIO5 (bank flipped to input per read), Settings > System switch default OFF, DIFF LOCK pills on the Driveline, 'difflock' console; wiki diff-lock-inputs
Firmware / build (push) Successful in 7m26s
2026-09-29 09:48:57 +02:00
julian f07590bbc5 Remove the deep-sleep feature entirely (user decision): power manager, Settings switch, NVS key, sleep bit in the shared header, wiki page and cheat-sheet entries
Firmware / build (push) Successful in 6m59s
v0.1.10
2026-09-28 17:20:54 +02:00
julian 59fae2c219 Sleep: drive and hold the 20 RGB panel lines low before deep sleep (white flickering edges seen on the bench)
Firmware / build (push) Successful in 7m7s
2026-09-28 16:53:16 +02:00
julian 803af7568f Rename Controller A/B -> Main CTRL / Inst. Cluster (user); Sleep when the car is off: Settings switch, deep sleep on quiet CAN + idle screen, CAN RX wake, switch mirrored to the cluster; docs
Firmware / build (push) Successful in 7m22s
2026-09-28 16:38:13 +02:00
julian 7a74c02b20 docs: COMMANDS.md - build, upload, monitor and console cheat-sheet for both controllers
Firmware / build (push) Failing after 6m11s
2026-09-28 10:21:06 +02:00
julian 63d64362e8 No invented data: shared structure starts with nothing valid, cleared on CAN stop and bus silence; DEFAULT_* removed from the shared header
Firmware / build (push) Successful in 7m19s
v0.1.9
2026-09-28 09:30:59 +02:00
julian ae9327d91b Status overlay on every screen: Wi-Fi chip top-right, blinking alert banner; Driveline values red on crossed thresholds, ring red on gear mismatch
Firmware / build (push) Successful in 7m12s
v0.1.8
2026-09-27 21:40:37 +02:00
julian 7ae1ab726a link: separator in the Controller B update log line; wiki: B update verified end-to-end
Firmware / build (push) Successful in 7m29s
2026-09-27 20:47:35 +02:00
julian 3e86ca3733 Controller B updates from A: link_peer (pairing over the wire, encrypted credential handoff, B status + commands), ESP-NOW receive/unicast, Updates page with two cards; shared header maintenance frames; docs + wiki
Firmware / build (push) Successful in 7m1s
2026-09-27 20:26:44 +02:00
julian 8338e4e300 Wiki: v0.1.7 published, manifest verified off-device
Firmware / build (push) Successful in 5s
2026-09-27 18:29:46 +02:00
julian 8e739fa24e CI: install pioarduino's PlatformIO core fork (upstream core lacks FortranCommon with the pinned SCons on the ESP-IDF build path)
Firmware / build (push) Successful in 7m4s
v0.1.7
2026-09-27 18:21:28 +02:00
julian 929fdfa877 Wiki: v0.1.7 release note (display work merged)
Firmware / build (push) Failing after 3m38s
2026-09-27 18:07:01 +02:00
julian 990ba68590 OTA: screen stays on with a progress bar and 'do not switch off' (flash writes no longer blank the panel under XIP); wiki step 4 2026-09-27 18:00:33 +02:00
julian 26e61190f9 Wiki: step 3 verified - OTA download keeps 24 panel frames/s under XIP from PSRAM 2026-09-27 17:48:40 +02:00
julian f69d195e2a display-xip: rebuild core with XIP_FROM_PSRAM + LCD_RGB_ISR_IRAM_SAFE; drop unused IDF components 2026-09-27 17:45:40 +02:00
julian 518358a2ab Correct the record: bounce buffers (10 lines) and 21 MHz clock come from the board header; drop dead ESP_PANEL_LCD_RGB flags; dots = late bounce refills
Firmware / build (push) Successful in 4m3s
2026-09-27 17:08:05 +02:00
julian 5a874ff943 Wiki: dots are sub-frame DMA glitches (panel 24/s while visible); OTA drops panel to 4-8 fps
Firmware / build (push) Successful in 6s
2026-09-27 17:03:36 +02:00
julian 6593abe9f5 Driveline: write labels only on change (idle 9.7 fps -> 0); perf: panel vsync counter + esp_timer reporting
Firmware / build (push) Successful in 4m2s
2026-09-27 16:57:06 +02:00
julian 94c70a572b Wiki: display baseline session analysed (perf-baseline-2026-09-27); Q13 plan amended with step 1b
Firmware / build (push) Successful in 6s
2026-09-27 16:52:11 +02:00
julian bbfa5d9e80 tools/perf_session.py: log PERF lines + typed markers while provoking display symptoms
Firmware / build (push) Successful in 4m10s
2026-09-27 16:44:29 +02:00
julian d3e499efed Add perf console (render fps, flush cost, CPU idle, heap) for the display work; record idle baseline
Firmware / build (push) Successful in 4m8s
2026-09-27 16:43:53 +02:00
julian 43ca6b96ec Wiki: Q13 becomes a must-fix (dots persist, OTA needs on-screen progress); log the review
Firmware / build (push) Successful in 6s
2026-09-27 16:31:21 +02:00
julian 23b7027d40 Wiki: board schematic re-downloaded; VOUT = H8 solder jumper (3V3 default / 5V), 5 V rail budget, SD pins
Firmware / build (push) Successful in 6s
2026-09-27 16:15:07 +02:00
julian 40a21557f0 Wiki: display platform plan (open-questions #13), SquareLine decommissioned
Firmware / build (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 08:29:02 +02:00
julian 34b3fc7ec0 Decommission SquareLine: delete include/ui, theme set in display_init
Firmware / build (push) Successful in 4m1s
include/ui (SquareLine export: ui_init, placeholder screen, helpers, theme
manager, project metadata) is no longer used - every screen is hand-coded.
The one live line, the dark default LVGL theme, moves to display_init.cpp.
Build filter and include path drop include/ui. Comments, CLAUDE.md and the
stale README sections (features, layout, partitions) updated.

Verified on the board (USB, dev): Wi-Fi on/forget/scan/join, dark keyboard
and dialogs, update check + install of v0.1.5 from the screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.6
2026-09-27 08:17:01 +02:00
julian 5d495f8ad1 Wiki: v0.1.5 UX refactor, remembered Wi-Fi, on-screen updates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 07:55:09 +02:00
julian e68fad73b6 Hand-coded Settings + tabbed Gauge Tuning; remembered Wi-Fi; on-screen updates
Firmware / build (push) Successful in 3m58s
Settings (replaces the SquareLine screen, now deleted): sidebar with
Wi-Fi (switch, status card with failure reasons, networks nearby,
full-screen password page), Updates (installed vs latest, Check, Install
behind a confirm dialog) and System (CAN / link / perf overlay switches,
live link, CAN, memory, uptime).

Gauge Tuning: tabs Tachometer / Coolant gauge / Alerts / Simulation,
56 px -/+ rows with hints and real units, accelerating hold-to-repeat,
per-tab Reset with confirm, save indicator, SIMULATION ON chip, swipe
left to go back.

WiFiManager rewritten without LVGL code: one remembered network (NVS
"wifi"), auto-join at boot, scans only on request, no endless reconnect
(keeps the ESP-NOW channel stable), failure reasons from the disconnect
event, password never logged. Ota gains getStatus()/requestCheck()/
requestInstall() for the screen. CAN/UART switches become setEnabled().
Shared ui_kit (header, buttons, switches, confirm dialog); Montserrat
20/24 enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.5
2026-09-27 07:38:17 +02:00
julian 766019a01e Fix UI freeze/reboots: LVGL pool to PSRAM, dangling SSID buttons, scan policy
Firmware / build (push) Successful in 4m24s
- lv_conf: LVGL widget pool 48 KB internal -> 512 KB PSRAM (LV_MEM_POOL_ALLOC).
  It ran out after a few Settings visits (87% used, 31% frag, 4.5 KB biggest
  block; lv_mem_buf_get() failed in a label draw - decoded backtrace). Also
  frees 48 KB of internal RAM: free 16 -> 69 KB, largest block 7.6 -> 31.7 KB
- lv_conf: LV_ASSERT_HANDLER abort() instead of while(1), which spun inside the
  task holding the LVGL lock and froze the UI + console
- wifi_manager: SSID buttons clear their g_ssid_buttons[] slot on
  LV_EVENT_DELETE (SquareLine deletes the Settings screen on leave; stale
  pointers were lv_obj_del()'d on the next scan). Scan only while the list is
  on screen and not connected - 10 s background scans caused the display dots
- main: `mem` console command (internal heap, PSRAM, LVGL pool)
- docs: board page lessons, open-questions #13/#14, ota-updates, CLAUDE.md, log

Verified: 10 Settings visits + 9 list rebuilds, pool peak 4%, 0 crashes; user
confirms no freeze, no reboot, no dots, swipes better.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.4
2026-09-27 00:32:18 +02:00
julian 842f270398 Wiki sweep for the OTA/display session
Firmware / build (push) Successful in 6s
- ota-updates: status table of every OTA cycle (incl. the 570 B abort and the
  clean failure path), v0.1.3 published/not installed, 'installs are done by the
  running firmware', flicker cause verified, Wi-Fi lost on reboot, console
  without reset, B repo now public
- esp32-s3-touch-lcd-5b: drop the unmeasured ~50 FPS claim, USB serial is
  native CDC 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, disconnect(true)
  bug, B updates via A over ESP-NOW
- open-questions #14: Wi-Fi UX redesign, remember network, delete v0.1.0
- CLAUDE.md: same FPS / USB-serial corrections; index + log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:05:13 +02:00
julian 29711fa25e CI: skip main builds for tagged or docs-only commits
Firmware / build (push) Successful in 3m56s
A main push now skips itself when its commit already carries a v* tag (the tag
build covers it - release with git push --follow-tags) or when it only changes
wiki/** or *.md. Checked inside the job, so tag builds are never path-filtered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 23:58:32 +02:00
julian 51fd4a868a OTA: don't abort a download on a momentary connected()==false
Firmware / build (push) Successful in 4m0s
A forced reinstall aborted at 570 B when the TLS client briefly reported
disconnected between records; the retry went through. A drop now only counts
after 2 s without data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.3
2026-09-26 23:19:12 +02:00
julian eb9cbd985f Display quick fixes: instant screen switches, deferred NVS saves, dark OTA writes, version label
Firmware / build (push) Successful in 4m30s
- screen switches use LV_SCR_LOAD_ANIM_NONE: full-screen fades were re-rendered
  and blended in software every frame and stuttered at 1024x600
- Tunables: NVS write 3 s after the last change or on leaving the Tuning screen
  (Tunables::flush()), not per tap - each flash write flickers the RGB panel
- OTA: backlight off while the image is written, with full-screen notices
  before and after; tunables flushed before any reboot
- firmware version shown bottom-right on every screen (lv_layer_top)
- docs: CLAUDE.md, wiki ota-updates, open-questions #13, log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.2
2026-09-26 23:00:28 +02:00
julian 0a76cd8c0e Wiki: first OTA update verified end-to-end (dev -> v0.1.1)
Firmware / build (push) Successful in 4m21s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:49:59 +02:00
julian bb0895674a OTA bring-up fixes: loop-task jobs + PSRAM TLS, ESP-NOW survives Wi-Fi, wifi console
Firmware / build (push) Successful in 4m24s
- ota: internal RAM has 15.9 KB free / 7.6 KB largest block with Wi-Fi up, so
  jobs now run in the loop task (8 KB stack; 3.6 KB headroom measured on
  `ota check`) with mbedtls allocations routed to PSRAM during the job
- wifi_manager: WiFi.disconnect(true) powered the radio off and killed ESP-NOW
  whenever Wi-Fi was used; now disconnect() only. showConnectionResult() waits
  for the LVGL lock and null-checks widgets. New `wifi join|status|off` console
- espnow_link: send() re-initialises ESP-NOW if the driver dropped it
- wiki: ota-updates memory + bugs sections, open-questions #13 (internal RAM),
  log; CLAUDE.md notes

Verified on the board: `wifi join` connects, ESP-NOW 195 sent / 0 failed while
joined, `ota check` verifies v0.1.0's signature on-device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.1
2026-09-26 22:37:08 +02:00
julian f5b7f43e7c Re-enable the Settings Wi-Fi switch at runtime
The SquareLine export has shipped ui_Toggle_Wifi_Switch with LV_STATE_DISABLED
since the first commit, so it ignored every touch. OTA needs Wi-Fi joined, so
clear the state in UIStateManager's sync (survives SquareLine re-exports).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:18:18 +02:00
julian 1ec93dc413 Rename signing secret to BMW_NISSAN_FIRMWARE_SIGNING_KEY
Firmware / build (push) Successful in 4m5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main-latest v0.1.0
2026-09-26 22:05:16 +02:00
julian effa949429 OTA updates for Controller A: dual-slot partitions, signed Gitea releases
- partition table: two 7.9 MB OTA slots, SPIFFS dropped, nvs/otadata offsets
  unchanged (tunables survived the one-time USB flash)
- ota_update.cpp: manual `ota status|check|install|rollback` console; HTTPS
  pull from the public repo's latest release, ECDSA P-256 signature over
  "patrol-a|version|sha256" checked before download, streamed image must match,
  parked gate before download and before the slot switch, 30 s
  confirm-or-rollback (verifyRollbackLater override)
- ota_config.h: server/repo, ISRG Root X1 + Root YR, signing public key
- .gitea/workflows/firmware.yml: main -> rolling unsigned pre-release
  main-latest; v* tag -> signed release (needs secret FIRMWARE_SIGNING_KEY)
- wiki: pages/ota-updates.md (design, decisions, B-over-ESP-NOW plan);
  CLAUDE.md, index, log, open-questions #12 updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 21:59:46 +02:00
julian da4c96903b Clarify self-poll needs no session/security; record Diagnostics-screen plan
- capture proof: Launch used only 1A/2C/22/23 - no 10/27/3E. Self-polling a
  2C live value needs just the define + poll, no session or security seed.
  Corrected the earlier "needs session handshake" wording.
- design decision: active polling (if built) lives behind a password-
  protected Diagnostics screen - authorized-tech gate, manual, refuses with
  a scan tool connected, read-oriented services. open-questions #12.
- wiki: launch-capture + obd-diagnostic-polling tightened; project memory
  added so the capability and guard rails are not re-researched later

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 17:06:20 +02:00
julian 6bdf4d43a9 Launch capture: decode rail pressure (service 2C, bar = raw x 0.03)
- capture-with-Launch session: live data on this DDE comes via KWP service
  2C (2C 10 00 DF -> 6C 10 HHLL), not the 22 D1xx identifiers (absent) or
  the session-gated 21 blocks
- rail pressure actual VERIFIED two-point vs the Launch display:
  bar = HHLL x 0.03 (idle ~305, 2500 rpm ~430)
- recipe now generalises to any Launch-visible value; self-poll needs the
  session/define handshake (captured, deferred design decision)
- wiki: sources/launch-capture-2026-09-23.md, obd-diagnostic-polling,
  open-questions #7, index; raw serial capture (~13 MB)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 16:48:10 +02:00
julian 61e190b1b9 Diag scans: 22 D1xx refuted, 21 xx session-locked; add diag raw toggle + scanner
- diag probe: `diag raw on|off` console command (mutes CANRAW during scans)
- tools/diag_scan.py: identifier-space sweeper via `diag bmw`
- findings: whole 22 D1xx block NRCs (clipping identifiers wrong for this
  DDE); 21 xx sparse - 21 20 = O_269962, measurement blocks gated behind
  diagnostic session / security access -> Launch capture is the path to
  live data
- wiki: route-b source page + obd-diagnostic-polling updated, raw scan logs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 16:02:18 +02:00
julian 7a7398243b Diag day: Route A+B verified live, DTCs read, donor identified as E60 530d
- diag probe: add mode 03 (diag dtc), BMW KWP on 0x6F1 with extended
  addressing (diag ident, diag bmw), read-only service whitelist
  (1A/18/21/22), MAX_PAYLOAD 64->384, full hex+ascii dump of BMW replies
- tools/diag_session.py: one-session probe runner, logs into wiki/raw/
- wiki: Route A results (11 mode-01 PIDs, rpm/coolant cross-checked, mode
  09 silent), Route B verified (0x6F1 [12] -> 0x612), 1A 86 ident with
  VIN prefix WBANC92090 (E60 530d), DTCs P0101/P0113/P0500/P0545/P0030
  (disconnected-sensor swap leftovers), open-questions #2/#7 updated

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 12:54:24 +02:00
julian e9fc24778a Gauge drive day: CANNY comparison, cluster signal research, serial tools
Wiki: two new pages - canny-5-3-pico-gauge-drive (why the CANNY's 12V
negative output moved the needles and 3.3V push-pull could not; 2SK3069
low-side stage) and patrol-instrument-cluster (tach 2 ppr + trim -13
calibration, NTC temp sender curve, 20 kHz PWM flutter fix, and the
four-layer steppy-needle diagnosis ending at the cluster's ~150 rpm
count quantization, defeated with adaptive dither on B).

Tools: serial_logger.py (multi-port capture to wiki/raw), serial_cmd.py
(one-shot cfg commands to A), dual_serial_capture.py (bench snapshots),
tach_ramp.py / tach_ramp2.py (synthetic rpm sweeps via cfg override).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 11:12:20 +02:00
julian 974082cb3e Add diag console probe (OBD-II mode 01/09 on 0x7DF); wiki: diagnostic polling, two sources
Firmware:
- CANDriver::transmit(): the single sanctioned transmit path (single-shot,
  echoed as CANTX lines, TX_FAILED alert counted); CAN-task warnings now take
  the serial lock
- DiagProbe module: `diag pids` supported-PID bitmap scan, `diag pid <hex>`,
  `diag vin`, `diag ecu`, `diag status`; ISO-TP reassembly with flow control;
  one request in flight, refused for 3 s after any foreign tester frame
- Console dispatch chained via Tunables::setExtraCommandHandler()
- CLAUDE.md and docs/UART_PROTOCOL.md updated

Wiki:
- New page obd-diagnostic-polling (broadcast vs polled, 0x6F1->0x612 addressing,
  Route A generic OBD PID table, Route B, test-day procedure, firmware probe)
- New sources: google-ai-dde7m57-pids (clipping, unverified, 0x612 direction
  contradicted), dwr-335d-torque-pids (thread + raw/BMW 335d.csv decoded)
- Clippings/ folder added to the schema (Obsidian Web Clipper, treated as raw/)
- bmw-m57n-engine, can-bus-integration, open-questions, index, log updated
2026-09-21 19:51:49 +02:00
julian f60bdac268 Link protocol v2, ESP-NOW leg, gauge tunables + tuning screen; remove Home screen
Protocol v2 (shared header, byte-identical with the 1.3 repo):
- typed DATA/CONFIG frames: 0xAA | ver | type | len | payload | XOR | 0x55
- gear split into lever (P/R/N/D/S/M) + target/engaged nibbles, engine rpm,
  alert bitmap decided here from tunable thresholds, link_config_t tunables
- docs/UART_PROTOCOL.md rewritten for v2

Controller A modules:
- tunables: gauge calibration + alert thresholds in NVS, 'cfg' serial console,
  bench override (never persisted)
- espnow_link: every frame also broadcast on ESP-NOW ch 1; radio stays in STA
  (WiFiManager no longer powers it off)
- uart_manager: DATA at 5 Hz + CONFIG on change/5 s on both transports
- can_driver: publishes gear pieces and rpm, evaluates alerts
- tuning_screen: hand-coded Gauge Tuning page (swipe right from Driveline),
  -/+ rows, enable switches, override sliders, Driveline/Defaults buttons

UI: SquareLine Home screen (3 meters + battery) and meters_manager removed;
Driveline is the boot screen; Settings back-gesture calls app_show_driveline().

tools/fix_penv_deps.ps1: repairs the shared PlatformIO penv after a 1.3 build.
Bench-verified with Controller B: both transports alive, dedupe, override
rpm 2000 -> 133.3 Hz tach output.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-21 19:12:31 +02:00
julian a8f68ebc27 Update workspace configuration: change Welcome.md to New tab and adjust file explorer settings 2026-09-21 11:00:50 +02:00
julian 63367f5490 Retire .docs; move UART spec to docs/; correct stale CAN/UART facts in CLAUDE.md
- Delete .docs/CAN_BUS_INTEGRATION.md (placeholder CAN IDs, external transceiver
  wiring the board does not need); superseded by wiki/pages/can-id-candidates.md
- Move UART_PROTOCOL.md to docs/ as the single copy of the packet spec
- Move the annotated board photo into wiki/raw/ and add a source page for it
- CLAUDE.md: verified 11-bit CAN ID list replaces the placeholders, TWAI_MODE_NORMAL
  replaces LISTEN_ONLY, UART TX is GPIO 44, dummy-data references removed
- Wiki index/log updated; note the schematic PDF is missing from disk

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-21 10:56:59 +02:00