Files
gronod 2458a61625 Add model-executable refactor megaplan and session phases
Lock P00–P08 with in/out scope, frozen APIs, verify commands, and
one-phase-per-session protocol for the IDF modular UI work.
2026-09-16 11:12:29 +00:00

1.7 KiB

P08 — Arduino debt burn-down

STATUS: TODO DEPENDS: P06 (behaviour parity). P07 optional. READ: this file, components/hal_motor/**, HAL headers from P03 OUT: recipe edits; UI redesign; LVGL-by-default FORBIDDEN: behaviour change of times/stop/resume; dropping cooperative stop

IN

Replace Arduino libs with IDF peripherals behind the same HAL. Remove Arduino-as-component from the S3 image first, then WROOM.

Order (one commit each, tests+builds green after each):

  1. Audio: LEDC / ledc_timer tones; delete tone().
  2. Motor: RMT TX pulse train for STEP, GPIO DIR/EN. hal_motor_request_stop aborts RMT + EN HIGH. Delete AccelStepper. Same 4800 steps/rev, 60 RPM, accel ≈9600 (RMT may use a short ramp table).
  3. Temp: RMT or onewire_bus IDF component; keep +0.4 °C offset. Delete Dallas/OneWire Arduino.
  4. Keypad: GPIO matrix scan in hal_input (no Keypad lib). Same keymap.
  5. LCD 2004: IDF I2C + HD44780 nibble commands (or esp_lcd panel io i2c). Delete LiquidCrystal_I2C.
  6. Drop espressif/arduino-esp32 from idf_component.yml when nothing includes Arduino.h.

Do not change hal_* public headers except adding RMT-specific internals in .c.

VERIFY

Host tests pass (stubs unchanged).

Both boards build without Arduino component.

Hardware WROOM: Custom 10 s, Esc mid-step EN off, Resume remaining, temp display, beep Stop/Resume, complete alarm cancellable.

COMMITS

Per numbered item above, e.g. Replace AccelStepper with RMT step pulse HAL.

DoD

  • rg -n "Arduino.h|AccelStepper|LiquidCrystal|DallasTemperature|#include <Keypad.h>|#include <OneWire.h>" empty in main/ components/
  • Stop still EN-off first
  • STATUS→DONE