# Lappy v0.0.11 — backlight and touch recovery

This patch addresses the black display found during the first V2 Rev1.1 bench test on 18 October 2026. Street, Drag, Track and Settings layouts and both timing engines are unchanged; Settings shows the new version.

## Backlight

The Waveshare backlight is active-low on both revisions. v0.0.10 sent increasing PWM duty for increasing brightness, so the visible brightness decreased, and 100% switched the backlight off. NVS preserves brightness across normal reflashes, explaining why another flash could leave the display dark. Both vendor `lcd_bl_pwm_bsp.h` files define their brightness macros as `0xff - value`.

v0.0.11 inverts the duty: 0% → 255 (off), 100% → 0 (on). Backlight initialization also starts off. This corrects manual shutdown blanking as well as the brightness control. No settings partition is erased or automatically reset.

## Touch

Two captured v0.0.10 crashes show an I²C software timeout immediately before a cache write-back-to-flash panic while rendering. The pinned IDF 5.4.2 I²C code retains receive bookkeeping across its software-timeout path; a hardware-only bus reset does not reconstruct that state. Treat this as a separate issue from the confirmed brightness inversion.

Touch now uses persistent RAM command/receive buffers, a 100 ms timeout rather than 15 ms (one 10 ms RTOS tick after rounding), and recreates the touch-only I²C bus after a failed transfer. Failed recovery is retried after a delay. The RTC/power-expander bus remains separate. A failed read reports no touch.

The serial `status` command adds uptime, requested brightness, raw PWM duty, completed display frames and touch read/error/recovery counters. These diagnostics do not alter the display layout.

`CONFIG_LAPPY_TOUCH_TIMEOUT_TEST` forces the tenth touch transfer to have a zero-tick timeout for physical fault-injection testing. It defaults off and must remain disabled in both release profiles. A test image with this option enabled is not a release image.

## Validation

See `HARDWARE_BENCH_v0.0.11.md` for the actual device observations and validation limits. Physical Dragy timing accuracy, battery shutdown behavior and V1 hardware remain separate acceptance work.
