Commit Graph

5 Commits

Author SHA1 Message Date
julian de6752d558 Retire SquareLine: hand-coded gauge screen (oil quadrant dropped), LVGL lock, updates on change only; LVGL pool in PSRAM, millis tick, log off; 16 MB flash + OTA partitions; docs and wiki 2026-09-27 18:50:44 +02:00
julian bde1f57f62 Tach output: hardware-timer ISR, slew glide, adaptive dither
The Patrol cluster counts pulses in ~150 rpm quanta, so the needle
stepped no matter how clean the data was. Three-stage rework of the
tach path in gauge_outputs:

- Drop LEDC for the tach: Arduino 2.x ledcChangeFrequency() re-inits
  the timer and truncates the waveform mid-period, corrupting the
  cluster's counting window on every update. IO7 is now toggled from a
  1 MHz hardware-timer ISR with auto-reload - phase-continuous through
  every frequency change and immune to task scheduling (an esp_timer
  version wobbled under WiFi bursts).
- Slew limiter: update() (5 Hz packets) only sets a target; tick(),
  called every 20 ms from loop(), glides the output 25%/tick toward it.
- Adaptive dither: random +/-1.2 Hz (~45 rpm, half the cluster's count
  quantum) per tick while the target moves, fading to zero within 1.2 s
  at steady rpm - emulates the natural pulse jitter that makes factory
  senders look smooth, without flickering the needle at rest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-23 11:12:48 +02:00
julian 5fe313b7fa Link protocol v2 receiver, ESP-NOW leg, Patrol gauge outputs, gear pulse
- protocol header v2 copied byte-identical from the 5B repo
- uart_receiver: processFrame() shared by the UART framing task and ESP-NOW,
  version check, dedupe on packet_id+timestamp, per-transport liveness,
  CONFIG cache with sequence number
- espnow_receiver: STA mode, channel hopping while silent, locks on frames
- gauge_outputs: tach on IO7 (LEDC ch2, 14-bit), coolant PWM on IO8 (LEDC
  ch4, 8-bit), config cached in NVS, overrides applied but not saved
- main: gear label from lever + engaged/target (pulses while shifting, red on
  mismatch), icons driven by A's alert bits, gauge update at 5 Hz, link stats
- wiki: temp_stage.cfd (user's old CANNY program) decoded as prior art;
  controller-link, link-redundancy, patrol-gauge-outputs, open-questions
  updated with the bench-verified v2 results and calibration procedure

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-21 19:12:38 +02:00
julian 3613387d41 Add wiki second brain and root CLAUDE.md; retire .docs
- New wiki/ (Obsidian vault) following the LLM Wiki pattern: schema, index, log,
  entity page for the board, concept pages for the A->B link, wired+wireless
  redundancy, and Patrol gauge outputs, open questions, two sources
- New CLAUDE.md distilled from the surviving .docs content: verified pins,
  brightness/receiver/debug APIs, SquareLine rules, CH343 serial notes,
  gear-enum drift warning, Waveshare demo and schematic URLs
- Delete .docs/ (14 files): stale pin-hunting and troubleshooting guides,
  wrong header table, finished phase roadmap, duplicate UART spec (now in the
  5B repo at docs/UART_PROTOCOL.md)
- README.md repointed to CLAUDE.md and wiki/

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-21 10:57:05 +02:00
julian b6fb01ba73 Init New 2026-09-21 10:28:35 +02:00