Skip to content

fix(esp32-s3): LCD_CLOCKLESS GPIO crash fix + autoresearch --lcd/--lcd-spi - #2273

Merged
zackees merged 3 commits into
masterfrom
fix-lcd-clockless-gpio-autoresearch
Apr 17, 2026
Merged

zackees merged 3 commits into
masterfrom
fix-lcd-clockless-gpio-autoresearch

Conversation

@zackees

@zackees zackees commented Apr 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #2260 (merged). Fixes a boot crash in LCD_CLOCKLESS on real ESP32-S3 hardware and wires the autoresearch CLI so --lcd and --lcd-spi both work.

Crash fix

ChannelDriverLcdClockless defaulted dc_gpio=22 and clock_gpio=21. GPIO 22 does not exist on common ESP32-S3 packages, so esp_lcd_new_i80_bus → lcd_i80_bus_configure_gpio → gpio_func_sel hit an error-log path that detected heap poisoning and triggered a Guru Meditation panic.

Changed both defaults to GPIO 0, matching the legacy I2S LCD_CAM driver this replaces (the strapping pin tolerates being multiplexed to the unused PCLK/DC peripheral functions).

autoresearch CLI

  • --lcd now maps to LCD_CLOCKLESS (was the legacy I2S name).
  • New --lcd-spi flag maps to LCD_SPI (APA102/SK9822 via LCD_CAM I80).
  • Both auto-select the esp32s3 environment and are included in --all.

autoresearch RX decoder

examples/AutoResearch/AutoResearchTest.cpp now recognises LCD_CLOCKLESS and reconstructs the RX timing for wave3 or wave8 encoding using the same fl::canUseWave3() eligibility check the firmware uses at runtime.

GPIO pre-test timing

Bumped RpcClient boot_wait from 3s to 8s and enabled drain_boot in ci/autoresearch/gpio.py. The ESP32-S3 AutoResearch setup() takes ~5-7s before the RPC dispatcher is ready, so the old 3s wait raced the first ping against setup and produced intermittent GPIO PRE-TEST TIMEOUT failures.

.gitignore

Added .autoresearch_last.log and .claude/scheduled_tasks.lock — both are transient, rewritten by autoresearch runs and Claude Code's background-task system respectively.

Hardware verification (ESP32-S3 @ COM13, jumper GPIO 1 → GPIO 2)

Driver Result
LCD_SPI 4/4 patterns pass (passed:true)
LCD_CLOCKLESS 4/4 patterns pass (passed:true, after GPIO fix)

Related

Issue #2270 (follow-up) documents a shared-singleton re-init fragility between LCD_SPI and LCD_CLOCKLESS that this PR does not attempt to fix — single-driver sessions (the autoresearch case) work reliably.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a new --lcd-spi driver selection flag for ESP32-S3 LCD peripheral support.
  • Bug Fixes

    • Improved RPC connection timing for more reliable device setup.
    • Ensured buffer cleanup after transmission timeouts to avoid resource issues.
    • Updated default GPIO handling for clockless LCD drivers.
    • Enhanced waveform selection and timing for LCD_CLOCKLESS compatibility.
  • Chores

    • Updated .gitignore to exclude transient lock and log files.

zackees and others added 2 commits April 17, 2026 12:44
…-spi

Hardware bring-up for PR #2260 (LCD_CAM ISR-driven chunked DMA).

Crash fix
  ChannelDriverLcdClockless defaulted dc_gpio=22 and clock_gpio=21.
  GPIO 22 does not exist on common ESP32-S3 packages, so
  esp_lcd_new_i80_bus -> lcd_i80_bus_configure_gpio -> gpio_func_sel
  hit an error-log path that detected heap poisoning and triggered a
  Guru Meditation panic. Changed both defaults to GPIO 0 (same
  convention as the legacy I2S LCD_CAM driver this replaces).

autoresearch CLI
  --lcd now maps to LCD_CLOCKLESS (was the legacy I2S name).
  Added --lcd-spi mapping to LCD_SPI (APA102/SK9822 via LCD_CAM I80).
  Both auto-select the esp32s3 environment and are included in --all.

autoresearch RX decoder
  AutoResearchTest.cpp recognises LCD_CLOCKLESS and reconstructs the
  RX timing for wave3 or wave8 encoding using the same
  fl::canUseWave3() eligibility check the firmware uses at runtime.

GPIO pre-test timing
  Bumped RpcClient boot_wait from 3s to 8s and enabled drain_boot in
  gpio.py. The ESP32-S3 AutoResearch setup() takes ~5-7s before the
  RPC dispatcher is ready, so the old 3s wait raced the first ping
  against setup and produced intermittent GPIO PRE-TEST timeouts.

Hardware verification (ESP32-S3 @ COM13, jumper GPIO 1 -> GPIO 2)
  LCD_SPI:       4/4 patterns pass (passed:true)
  LCD_CLOCKLESS: 4/4 patterns pass (passed:true, after GPIO fix)

Host unit tests: 299/299 pass. Lint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
.autoresearch_last.log is rewritten by every autoresearch run and
.claude/scheduled_tasks.lock is a lockfile managed by Claude Code's
background-task system. Neither should be tracked.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 17, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds LCD_SPI driver wiring to AutoResearch (CLI flag, phase selection, example support), increases RPC boot-wait and ping timeout for GPIO tests, updates default GPIO assignments in LCD clockless driver files, and adjusts host waveform selection to support wave3 and wave8 for LCD_CLOCKLESS.

Changes

Cohort / File(s) Summary
Ignore list
/.gitignore
Added .claude/scheduled_tasks.lock and .autoresearch_last.log to ignore transient files.
Configuration & CLI
ci/autoresearch/args.py
Added lcd_spi boolean to Args, wired --lcd-spi CLI flag, updated LCD-related help text and --all listing.
Phase selection & GPIO tests
ci/autoresearch/phases.py, ci/autoresearch/gpio.py
Auto-select final_environment="esp32s3" when --lcd-spi set; replace I2S references with LCD_CLOCKLESS/LCD_SPI in driver matrix; increased RPC boot_wait from 3.0→8.0, set drain_boot=True, and added timeout=15.0 to ping.
Example host waveform logic
examples/AutoResearch/AutoResearchTest.cpp
Added fl/channels/wave3.h; capture() now detects LCD_CLOCKLESS eligibility for wave3 vs wave8, computes wave3 timing (tick_ns = period/3), and broadens RX tolerance for both.
Driver teardown & defaults
src/platforms/esp/32/drivers/.../channel_driver_lcd_spi.cpp.hpp, src/platforms/esp/32/drivers/.../channel_driver_lcd_clockless.cpp.hpp
Destructors now always call freeRingBuffers() instead of early-returning on DMA timeout; LCD_CLOCKLESS default GPIOs updated: clock_gpio and dc_gpio default to 0 (was 21/22).

Sequence Diagram(s)

sequenceDiagram
  participant Host
  participant AutoResearch_CLI
  participant RPC_Client
  participant Device
  participant Driver

  Host->>AutoResearch_CLI: run with --lcd-spi
  AutoResearch_CLI->>Host: set Args.lcd_spi
  AutoResearch_CLI->>RPC_Client: start client (boot_wait=8.0, drain_boot=true)
  RPC_Client->>Device: open connection
  RPC_Client->>Device: ping(timeout=15.0)
  Device-->>RPC_Client: pong
  AutoResearch_CLI->>Host: select final_environment="esp32s3"
  Host->>Driver: load LCD_SPI / LCD_CLOCKLESS path
  Driver->>Device: beginTransmission / configure GPIOs (defaults possibly updated)
  Host->>Driver: capture() chooses wave3 or wave8 via fl::canUseWave3()
  Driver->>Device: transmit using chosen waveform
  Device-->>Host: capture result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Poem

🐰 A little rabbit hops and sings,
New SPI trails and clockless wings.
Wave3 skips and wave8 sways,
GPIO defaults change their ways—
Boot waits stretch for brighter things ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: a GPIO crash fix for ESP32-S3 LCD_CLOCKLESS and autoresearch CLI updates for --lcd and --lcd-spi flags.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-lcd-clockless-gpio-autoresearch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Header Compilation Performance

Total Time: 1226.16ms

Top 5 Slowest Headers

  1. FastLED.h - 929.26ms
  2. fl/fastled.h - 386.26ms
  3. fl/task/executor.h - 326.19ms
  4. crgb.h - 220.20ms
  5. fl/gfx/crgb.h - 218.88ms

Warnings

⚠️ Header FastLED.h exceeds 150ms (929.3ms)
⚠️ Header fl/fastled.h exceeds 150ms (386.3ms)
⚠️ Header fl/task/executor.h exceeds 150ms (326.2ms)
⚠️ Header crgb.h exceeds 150ms (220.2ms)
⚠️ Header fl/gfx/crgb.h exceeds 150ms (218.9ms)
⚠️ Header fl/math/ease.h exceeds 150ms (213.8ms)
⚠️ Header fl/math/fixed_point.h exceeds 150ms (211.4ms)
⚠️ Header fl/task/scheduler.h exceeds 150ms (172.9ms)
⚠️ Header fl/stl/singleton.h exceeds 150ms (163.3ms)
⚠️ Header fl/stl/thread_local.h exceeds 150ms (162.5ms)
⚠️ Header fl/stl/thread.h exceeds 150ms (161.3ms)
⚠️ Header platforms/thread.h exceeds 150ms (161.2ms)
⚠️ Header platforms/stub/thread_stub.h exceeds 150ms (161.2ms)
⚠️ Header platforms/stub/thread_stub_stl.h exceeds 150ms (161.1ms)
⚠️ Header fl/task/promise.h exceeds 50ms (139.4ms)
⚠️ Header fl/ui.h exceeds 50ms (121.0ms)
⚠️ Header fl/stl/function.h exceeds 50ms (83.2ms)
⚠️ Header fl/stl/json.h exceeds 50ms (78.4ms)
⚠️ Header fl/math/fixed_point/s4x12.h exceeds 50ms (63.5ms)
⚠️ Header fl/stl/json/types.h exceeds 50ms (60.8ms)
⚠️ Header platforms.h exceeds 50ms (55.8ms)
⚠️ Header platforms/stub/fastled_stub.h exceeds 50ms (55.8ms)
⚠️ Header fl/stl/string.h exceeds 50ms (50.9ms)
⚠️ Template instantiation time is high (53.1%)

Full Report
================================================================================
FASTLED COMPILATION PERFORMANCE REPORT
================================================================================
Generated: 2026-04-17 19:48:32
Compiler: clang++-17
File: ci/perf/test_compile.cpp

SUMMARY
--------------------------------------------------------------------------------
Total Compilation Time:    1,752.99 ms
Frontend Time:             17.59 ms (1.0%)
Backend Time:              206.26 ms (11.8%)

COMPILATION PHASES
--------------------------------------------------------------------------------
Source                     9238.67 ms (527.0%)
Templates                   623.94 ms ( 35.6%)

FASTLED HEADERS (Level 1 - Direct Includes)
--------------------------------------------------------------------------------
  1248.1 ms - FastLED.h (SLOW)
   546.8 ms - fl/task/executor.h (SLOW)
   451.3 ms - fl/fastled.h (SLOW)
   352.1 ms - fl/task/promise.h (SLOW)
   302.4 ms - fl/stl/function.h (SLOW)
   280.1 ms - crgb.h (SLOW)
   278.8 ms - fl/gfx/crgb.h (SLOW)
   273.8 ms - fl/math/ease.h (SLOW)
   271.4 ms - fl/math/fixed_point.h (SLOW)
   193.2 ms - fl/stl/shared_ptr.h (SLOW)
   180.8 ms - fl/task/scheduler.h (SLOW)
   171.2 ms - fl/stl/singleton.h (SLOW)
   170.5 ms - fl/stl/thread_local.h (SLOW)
   169.3 ms - fl/stl/thread.h (SLOW)
   169.2 ms - platforms/thread.h (SLOW)
   169.2 ms - platforms/stub/thread_stub.h (SLOW)
   169.1 ms - platforms/stub/thread_stub_stl.h (SLOW)
   123.6 ms - fl/math/fixed_point/s4x12.h (SLOW)
   121.0 ms - fl/ui.h (SLOW)
   110.4 ms - fl/stl/type_traits.h (SLOW)

FASTLED HEADERS (Nested Includes - Up to 10 Levels)
--------------------------------------------------------------------------------
FastLED.h (1248.1ms)
  ├─  546.8 ms - fl/task/executor.h
  │ ├─  352.1 ms - fl/task/promise.h
  │ │ ├─  302.4 ms - fl/stl/function.h
  │ │ │ ├─  193.2 ms - fl/stl/shared_ptr.h
  │ │ │ │ ├─  110.4 ms - fl/stl/type_traits.h
  │ │ │ │ │ └─  103.8 ms - fl/stl/move.h
  │ │ │ │ ├─   77.6 ms - fl/stl/atomic.h
  │ │ │ │ │ └─   76.7 ms - platforms/atomic.h
  │ │ │ │ │   └─   76.6 ms - platforms/shared/atomic.h
  │ │ │ │ └─    0.8 ms - fl/stl/bit_cast.h
  │ │ │ ├─   79.2 ms - fl/stl/vector.h
  │ │ │ │ ├─   48.2 ms - fl/math/math.h
  │ │ │ │ │ └─   42.3 ms - fl/stl/undef.h
  │ │ │ │ │   └─   81.9 ms - stdlib.h
  │ │ │ │ │     ├─   41.5 ms - cstdlib
  │ │ │ │ │     │ └─   81.9 ms - stdlib.h
  │ │ │ │ │     │   ├─   41.5 ms - cstdlib
  │ │ │ │ │     │   ├─   12.7 ms - types.h
  │ │ │ │ │     │   └─    0.6 ms - floatn.h
  │ │ │ │ │     ├─   12.7 ms - types.h
  │ │ │ │ │     │ ├─   12.7 ms - types.h
  │ │ │ │ │     │ │ ├─   12.7 ms - types.h
  │ │ │ │ │     │ │ ├─    2.3 ms - pthreadtypes.h
  │ │ │ │ │     │ │ ├─    2.3 ms - select.h
  │ │ │ │ │     │ │ └─    2.0 ms - endian.h
  │ │ │ │ │     │ ├─    2.3 ms - pthreadtypes.h
  │ │ │ │ │     │ │ └─    1.7 ms - thread-shared-types.h
  │ │ │ │ │     │ ├─    2.3 ms - select.h
  │ │ │ │ │     │ └─    2.0 ms - endian.h
  │ │ │ │ │     │   └─    0.5 ms - byteswap.h
  │ │ │ │ │     └─    0.6 ms - floatn.h
  │ │ │ │ ├─   18.8 ms - fl/stl/allocator.h
  │ │ │ │ │ └─   12.9 ms - fl/stl/bitset.h
  │ │ │ │ │   └─    8.3 ms - fl/stl/bitset_dynamic.h
  │ │ │ │ │     └─    2.2 ms - fl/stl/unique_ptr.h
  │ │ │ │ ├─    2.8 ms - fl/stl/basic_vector.h
  │ │ │ │ ├─    0.9 ms - fl/stl/functional.h
  │ │ │ │ └─    0.8 ms - fl/stl/initializer_list.h
  │ │ │ ├─   14.9 ms - fl/stl/variant.h
  │ │ │ │ └─   12.4 ms - fl/stl/new.h
  │ │ │ │   └─   12.4 ms - platforms/new.h
  │ │ │ │     └─   12.4 ms - platforms/shared/new.h
  │ │ │ │       └─   11.6 ms - new
  │ │ │ │         ├─    7.9 ms - c++config.h
  │ │ │ │         │ └─    6.1 ms - os_defines.h
  │ │ │ │         └─    0.9 ms - version.h
  │ │ │ ├─    4.7 ms - fl/stl/algorithm.h
  │ │ │ │ └─    2.0 ms - fl/math/random.h
  │ │ │ │   └─    0.9 ms - fl/math/random8.h
  │ │ │ └─    4.3 ms - fl/stl/compiler_control.h
  │ │ └─   44.5 ms - fl/stl/string.h
  │ │   ├─   13.0 ms - fl/stl/basic_string.h
  │ │   │ ├─    1.1 ms - fl/stl/not_null.h
  │ │   │ ├─    1.0 ms - fl/stl/iterator.h
  │ │   │ └─    0.6 ms - fl/stl/charconv.h
  │ │   ├─    8.8 ms - fl/stl/span.h
  │ │   │ └─    3.5 ms - fl/math/geometry.h
  │ │   ├─    5.6 ms - fl/stl/string_view.h
  │ │   └─    1.5 ms - fl/stl/optional.h
  │ ├─  180.8 ms - fl/task/scheduler.h
  │ │ ├─  171.2 ms - fl/stl/singleton.h
  │ │ │ └─  170.5 ms - fl/stl/thread_local.h
  │ │ │   └─  169.3 ms - fl/stl/thread.h
  │ │ │     └─  169.2 ms - platforms/thread.h
  │ │ │       └─  169.2 ms - platforms/stub/thread_stub.h
  │ │ │         └─  169.1 ms - platforms/stub/thread_stub_stl.h
  │ │ │           └─  168.0 ms - thread
  │ │ │             ├─  102.7 ms - std_thread.h
  │ │ │             └─   63.2 ms - this_thread_sleep.h
  │ │ └─    8.8 ms - fl/task/task.h
  │ │   └─    3.6 ms - fl/trace.h
  │ │     ├─    2.2 ms - fl/stl/chrono.h
  │ │     └─    1.0 ms - fl/stl/tuple.h
  │ ├─   11.6 ms - platforms/await.h
  │ │ └─   11.2 ms - platforms/coroutine_runtime.h
  │ │   └─    9.6 ms - fl/system/engine_events.h
  │ │     ├─    5.0 ms - fl/math/screenmap.h
  │ │     │ └─    3.6 ms - fl/stl/flat_map.h
  │ │     └─    3.1 ms - fl/math/xymap.h
  │ │       └─    0.8 ms - fl/math/lut.h
  │ └─    0.8 ms - fl/task/promise_result.h
  ├─  451.3 ms - fl/fastled.h
  │ ├─  280.1 ms - crgb.h
  │ │ ├─  278.8 ms - fl/gfx/crgb.h
  │ │ │ └─  273.8 ms - fl/math/ease.h
  │ │ │   └─  271.4 ms - fl/math/fixed_point.h
  │ │ │     ├─  123.6 ms - fl/math/fixed_point/s4x12.h
  │ │ │     │ ├─  102.9 ms - fl/math/sin32.h
  │ │ │     │ │ └─   99.6 ms - fl/math/simd.h
  │ │ │     │ │   └─   99.1 ms - fl/math/simd/types.h
  │ │ │     │ │     └─   98.8 ms - platforms/simd.h
  │ │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │ │     │ └─    0.8 ms - fl/math/fixed_point/isqrt.h
  │ │ │     ├─   18.8 ms - fl/math/fixed_point/s8x8.h
  │ │ │     ├─   18.5 ms - fl/math/fixed_point/s8x24.h
  │ │ │     ├─   18.4 ms - fl/math/fixed_point/s24x8.h
  │ │ │     └─   18.4 ms - fl/math/fixed_point/s16x16.h
  │ │ └─    0.8 ms - chsv.h
  │ │   └─    0.8 ms - fl/gfx/hsv.h
  │ ├─   59.7 ms - platforms.h
  │ │ └─   59.6 ms - platforms/stub/fastled_stub.h
  │ │   ├─   37.8 ms - platforms/stub/clockless_stub.h
  │ │   │ └─   37.8 ms - platforms/stub/clockless_channel_stub.h
  │ │   │   ├─   13.5 ms - fl/channels/data.h
  │ │   │   │ └─   10.1 ms - fl/channels/config.h
  │ │   │   │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │ │   │   │   │ └─    1.4 ms - fl/chipsets/led_timing.h
  │ │   │   │   └─    1.8 ms - fl/chipsets/spi.h
  │ │   │   ├─   13.2 ms - fl/system/log.h
  │ │   │   │ └─   12.7 ms - fl/stl/strstream.h
  │ │   │   ├─    2.5 ms - fl/channels/manager.h
  │ │   │   ├─    1.6 ms - fl/stl/weak_ptr.h
  │ │   │   └─    1.1 ms - fl/channels/driver.h
  │ │   └─   21.8 ms - platforms/stub/fastspi_stub.h
  │ │     └─   21.7 ms - platforms/stub/fastspi_stub_generic.h
  │ │       ├─   15.3 ms - platforms/shared/active_strip_data/active_strip_data.h
  │ │       │ └─   13.1 ms - fl/id_tracker.h
  │ │       │   └─   12.1 ms - fl/stl/mutex.h
  │ │       │     └─   12.0 ms - platforms/mutex.h
  │ │       │       └─   11.9 ms - platforms/stub/mutex_stub.h
  │ │       └─    6.1 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │ ├─   42.4 ms - colorutils.h
  │ │ └─   41.6 ms - fl/gfx/colorutils.h
  │ │   ├─    9.0 ms - fl/gfx/blur.h
  │ │   │ └─    4.8 ms - fl/gfx/canvas.h
  │ │   │   └─    2.9 ms - fl/math/alpha.h
  │ │   └─    3.2 ms - fl/gfx/fill.h
  │ ├─   23.9 ms - pixel_controller.h
  │ │ ├─   17.2 ms - pixel_iterator.h
  │ │ │ └─   17.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │ │   ├─    5.0 ms - fl/chipsets/encoders/apa102.h
  │ │ │   │ └─    3.9 ms - fl/chipsets/encoders/encoder_utils.h
  │ │ │   │   └─    3.2 ms - fl/gfx/gamma_lut.h
  │ │ │   ├─    4.5 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │ │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │ │ │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │ │ └─    2.6 ms - rgbw.h
  │ │   └─    2.4 ms - fl/gfx/rgbw.h
  │ └─   22.9 ms - pixeltypes.h
  │   ├─   19.2 ms - lib8tion.h
  │   │ ├─   10.0 ms - fl/math/math8.h
  │   │ │ ├─    5.2 ms - fl/math/intmap.h
  │   │ │ │ └─    4.1 ms - platforms/intmap.h
  │   │ │ ├─    2.5 ms - fl/math/scale8.h
  │   │ │ │ └─    2.5 ms - platforms/scale8.h
  │   │ │ │   └─    1.0 ms - platforms/shared/scale8.h
  │   │ │ └─    2.2 ms - platforms/math8.h
  │   │ │   └─    1.7 ms - platforms/shared/math8.h
  │   │ ├─    2.0 ms - fl/math/beat.h
  │   │ │ └─    1.0 ms - fl/math/trig8.h
  │   │ │   └─    1.0 ms - platforms/trig8.h
  │   │ │     └─    0.9 ms - platforms/shared/trig8.h
  │   │ └─    0.6 ms - fl/math/qfx.h
  │   └─    3.3 ms - crgb.hpp
  ├─  121.0 ms - fl/ui.h
  │ ├─   78.2 ms - fl/stl/json.h
  │ │ └─   60.4 ms - fl/stl/json/types.h
  │ │   └─    7.5 ms - fl/stl/limits.h
  │ ├─   10.4 ms - fl/ui_impl.h
  │ │ └─    9.8 ms - platforms/ui_defs.h
  │ │   ├─    2.2 ms - platforms/shared/ui/json/audio.h
  │ │   │ └─    1.1 ms - platforms/shared/ui/json/audio_internal.h
  │ │   ├─    1.6 ms - platforms/shared/ui/json/button.h
  │ │   │ └─    0.6 ms - platforms/shared/ui/json/ui_internal.h
  │ │   ├─    0.9 ms - platforms/shared/ui/json/checkbox.h
  │ │   ├─    0.9 ms - platforms/shared/ui/json/help.h
  │ │   └─    0.8 ms - platforms/shared/ui/json/number_field.h
  │ └─    6.1 ms - fl/stl/url.h
  ├─   31.8 ms - fl/stl/stdint.h
  │ └─   31.5 ms - platforms/int.h
  │   └─   31.0 ms - platforms/shared/int.h
  │     └─   30.9 ms - platforms/shared/int_linux.h
  └─   28.5 ms - chipsets.h
    ├─   11.6 ms - fl/chipsets/ucs7604.h
    │ └─    8.7 ms - fl/chipsets/encoders/ucs7604.h
    ├─    6.7 ms - fl/chipsets/apa102.h
    ├─    1.8 ms - fl/chipsets/lpd880x.h
    ├─    0.9 ms - fl/chipsets/encoders/ws2816.h
    └─    0.8 ms - fl/chipsets/p9813.h
fl/task/executor.h (546.8ms)
  ├─  352.1 ms - fl/task/promise.h
  │ ├─  302.4 ms - fl/stl/function.h
  │ │ ├─  193.2 ms - fl/stl/shared_ptr.h
  │ │ │ ├─  110.4 ms - fl/stl/type_traits.h
  │ │ │ │ └─  103.8 ms - fl/stl/move.h
  │ │ │ ├─   77.6 ms - fl/stl/atomic.h
  │ │ │ │ └─   76.7 ms - platforms/atomic.h
  │ │ │ │   └─   76.6 ms - platforms/shared/atomic.h
  │ │ │ └─    0.8 ms - fl/stl/bit_cast.h
  │ │ ├─   79.2 ms - fl/stl/vector.h
  │ │ │ ├─   48.2 ms - fl/math/math.h
  │ │ │ │ └─   42.3 ms - fl/stl/undef.h
  │ │ │ │   └─   81.9 ms - stdlib.h
  │ │ │ │     ├─   41.5 ms - cstdlib
  │ │ │ │     │ └─   81.9 ms - stdlib.h
  │ │ │ │     │   ├─   41.5 ms - cstdlib
  │ │ │ │     │   │ └─   81.9 ms - stdlib.h
  │ │ │ │     │   ├─   12.7 ms - types.h
  │ │ │ │     │   │ ├─   12.7 ms - types.h
  │ │ │ │     │   │ ├─    2.3 ms - pthreadtypes.h
  │ │ │ │     │   │ ├─    2.3 ms - select.h
  │ │ │ │     │   │ └─    2.0 ms - endian.h
  │ │ │ │     │   └─    0.6 ms - floatn.h
  │ │ │ │     ├─   12.7 ms - types.h
  │ │ │ │     │ ├─   12.7 ms - types.h
  │ │ │ │     │ │ ├─   12.7 ms - types.h
  │ │ │ │     │ │ │ ├─   12.7 ms - types.h
  │ │ │ │     │ │ │ ├─    2.3 ms - pthreadtypes.h
  │ │ │ │     │ │ │ ├─    2.3 ms - select.h
  │ │ │ │     │ │ │ └─    2.0 ms - endian.h
  │ │ │ │     │ │ ├─    2.3 ms - pthreadtypes.h
  │ │ │ │     │ │ │ └─    1.7 ms - thread-shared-types.h
  │ │ │ │     │ │ ├─    2.3 ms - select.h
  │ │ │ │     │ │ └─    2.0 ms - endian.h
  │ │ │ │     │ │   └─    0.5 ms - byteswap.h
  │ │ │ │     │ ├─    2.3 ms - pthreadtypes.h
  │ │ │ │     │ │ └─    1.7 ms - thread-shared-types.h
  │ │ │ │     │ ├─    2.3 ms - select.h
  │ │ │ │     │ └─    2.0 ms - endian.h
  │ │ │ │     │   └─    0.5 ms - byteswap.h
  │ │ │ │     └─    0.6 ms - floatn.h
  │ │ │ ├─   18.8 ms - fl/stl/allocator.h
  │ │ │ │ └─   12.9 ms - fl/stl/bitset.h
  │ │ │ │   └─    8.3 ms - fl/stl/bitset_dynamic.h
  │ │ │ │     └─    2.2 ms - fl/stl/unique_ptr.h
  │ │ │ ├─    2.8 ms - fl/stl/basic_vector.h
  │ │ │ ├─    0.9 ms - fl/stl/functional.h
  │ │ │ └─    0.8 ms - fl/stl/initializer_list.h
  │ │ ├─   14.9 ms - fl/stl/variant.h
  │ │ │ └─   12.4 ms - fl/stl/new.h
  │ │ │   └─   12.4 ms - platforms/new.h
  │ │ │     └─   12.4 ms - platforms/shared/new.h
  │ │ │       └─   11.6 ms - new
  │ │ │         ├─    7.9 ms - c++config.h
  │ │ │         │ └─    6.1 ms - os_defines.h
  │ │ │         │   └─    5.7 ms - features.h
  │ │ │         └─    0.9 ms - version.h
  │ │ ├─    4.7 ms - fl/stl/algorithm.h
  │ │ │ └─    2.0 ms - fl/math/random.h
  │ │ │   └─    0.9 ms - fl/math/random8.h
  │ │ └─    4.3 ms - fl/stl/compiler_control.h
  │ └─   44.5 ms - fl/stl/string.h
  │   ├─   13.0 ms - fl/stl/basic_string.h
  │   │ ├─    1.1 ms - fl/stl/not_null.h
  │   │ ├─    1.0 ms - fl/stl/iterator.h
  │   │ └─    0.6 ms - fl/stl/charconv.h
  │   ├─    8.8 ms - fl/stl/span.h
  │   │ └─    3.5 ms - fl/math/geometry.h
  │   ├─    5.6 ms - fl/stl/string_view.h
  │   └─    1.5 ms - fl/stl/optional.h
  ├─  180.8 ms - fl/task/scheduler.h
  │ ├─  171.2 ms - fl/stl/singleton.h
  │ │ └─  170.5 ms - fl/stl/thread_local.h
  │ │   └─  169.3 ms - fl/stl/thread.h
  │ │     └─  169.2 ms - platforms/thread.h
  │ │       └─  169.2 ms - platforms/stub/thread_stub.h
  │ │         └─  169.1 ms - platforms/stub/thread_stub_stl.h
  │ │           └─  168.0 ms - thread
  │ │             ├─  102.7 ms - std_thread.h
  │ │             │ ├─   39.4 ms - tuple
  │ │             │ ├─   13.2 ms - refwrap.h
  │ │             │ ├─   12.2 ms - gthr.h
  │ │             │ ├─   12.1 ms - iosfwd
  │ │             │ └─    6.0 ms - unique_ptr.h
  │ │             └─   63.2 ms - this_thread_sleep.h
  │ │               ├─   58.0 ms - chrono.h
  │ │               └─    3.8 ms - cerrno
  │ └─    8.8 ms - fl/task/task.h
  │   └─    3.6 ms - fl/trace.h
  │     ├─    2.2 ms - fl/stl/chrono.h
  │     └─    1.0 ms - fl/stl/tuple.h
  ├─   11.6 ms - platforms/await.h
  │ └─   11.2 ms - platforms/coroutine_runtime.h
  │   └─    9.6 ms - fl/system/engine_events.h
  │     ├─    5.0 ms - fl/math/screenmap.h
  │     │ └─    3.6 ms - fl/stl/flat_map.h
  │     └─    3.1 ms - fl/math/xymap.h
  │       └─    0.8 ms - fl/math/lut.h
  └─    0.8 ms - fl/task/promise_result.h
fl/fastled.h (451.3ms)
  ├─  280.1 ms - crgb.h
  │ ├─  278.8 ms - fl/gfx/crgb.h
  │ │ └─  273.8 ms - fl/math/ease.h
  │ │   └─  271.4 ms - fl/math/fixed_point.h
  │ │     ├─  123.6 ms - fl/math/fixed_point/s4x12.h
  │ │     │ ├─  102.9 ms - fl/math/sin32.h
  │ │     │ │ └─   99.6 ms - fl/math/simd.h
  │ │     │ │   └─   99.1 ms - fl/math/simd/types.h
  │ │     │ │     └─   98.8 ms - platforms/simd.h
  │ │     │ │       └─   98.7 ms - platforms/shared/simd_x86.hpp
  │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │     │ └─    0.8 ms - fl/math/fixed_point/isqrt.h
  │ │     ├─   18.8 ms - fl/math/fixed_point/s8x8.h
  │ │     ├─   18.5 ms - fl/math/fixed_point/s8x24.h
  │ │     ├─   18.4 ms - fl/math/fixed_point/s24x8.h
  │ │     └─   18.4 ms - fl/math/fixed_point/s16x16.h
  │ └─    0.8 ms - chsv.h
  │   └─    0.8 ms - fl/gfx/hsv.h
  ├─   59.7 ms - platforms.h
  │ └─   59.6 ms - platforms/stub/fastled_stub.h
  │   ├─   37.8 ms - platforms/stub/clockless_stub.h
  │   │ └─   37.8 ms - platforms/stub/clockless_channel_stub.h
  │   │   ├─   13.5 ms - fl/channels/data.h
  │   │   │ └─   10.1 ms - fl/channels/config.h
  │   │   │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │   │   │   │ └─    1.4 ms - fl/chipsets/led_timing.h
  │   │   │   └─    1.8 ms - fl/chipsets/spi.h
  │   │   ├─   13.2 ms - fl/system/log.h
  │   │   │ └─   12.7 ms - fl/stl/strstream.h
  │   │   ├─    2.5 ms - fl/channels/manager.h
  │   │   ├─    1.6 ms - fl/stl/weak_ptr.h
  │   │   └─    1.1 ms - fl/channels/driver.h
  │   └─   21.8 ms - platforms/stub/fastspi_stub.h
  │     └─   21.7 ms - platforms/stub/fastspi_stub_generic.h
  │       ├─   15.3 ms - platforms/shared/active_strip_data/active_strip_data.h
  │       │ └─   13.1 ms - fl/id_tracker.h
  │       │   └─   12.1 ms - fl/stl/mutex.h
  │       │     └─   12.0 ms - platforms/mutex.h
  │       │       └─   11.9 ms - platforms/stub/mutex_stub.h
  │       │         └─   11.8 ms - platforms/stub/mutex_stub_stl.h
  │       └─    6.1 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  ├─   42.4 ms - colorutils.h
  │ └─   41.6 ms - fl/gfx/colorutils.h
  │   ├─    9.0 ms - fl/gfx/blur.h
  │   │ └─    4.8 ms - fl/gfx/canvas.h
  │   │   └─    2.9 ms - fl/math/alpha.h
  │   └─    3.2 ms - fl/gfx/fill.h
  ├─   23.9 ms - pixel_controller.h
  │ ├─   17.2 ms - pixel_iterator.h
  │ │ └─   17.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │   ├─    5.0 ms - fl/chipsets/encoders/apa102.h
  │ │   │ └─    3.9 ms - fl/chipsets/encoders/encoder_utils.h
  │ │   │   └─    3.2 ms - fl/gfx/gamma_lut.h
  │ │   ├─    4.5 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │ │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │ └─    2.6 ms - rgbw.h
  │   └─    2.4 ms - fl/gfx/rgbw.h
  └─   22.9 ms - pixeltypes.h
    ├─   19.2 ms - lib8tion.h
    │ ├─   10.0 ms - fl/math/math8.h
    │ │ ├─    5.2 ms - fl/math/intmap.h
    │ │ │ └─    4.1 ms - platforms/intmap.h
    │ │ ├─    2.5 ms - fl/math/scale8.h
    │ │ │ └─    2.5 ms - platforms/scale8.h
    │ │ │   └─    1.0 ms - platforms/shared/scale8.h
    │ │ └─    2.2 ms - platforms/math8.h
    │ │   └─    1.7 ms - platforms/shared/math8.h
    │ ├─    2.0 ms - fl/math/beat.h
    │ │ └─    1.0 ms - fl/math/trig8.h
    │ │   └─    1.0 ms - platforms/trig8.h
    │ │     └─    0.9 ms - platforms/shared/trig8.h
    │ └─    0.6 ms - fl/math/qfx.h
    └─    3.3 ms - crgb.hpp
fl/ui.h (121.0ms)
  ├─   78.2 ms - fl/stl/json.h
  │ └─   60.4 ms - fl/stl/json/types.h
  │   └─    7.5 ms - fl/stl/limits.h
  ├─   10.4 ms - fl/ui_impl.h
  │ └─    9.8 ms - platforms/ui_defs.h
  │   ├─    2.2 ms - platforms/shared/ui/json/audio.h
  │   │ └─    1.1 ms - platforms/shared/ui/json/audio_internal.h
  │   ├─    1.6 ms - platforms/shared/ui/json/button.h
  │   │ └─    0.6 ms - platforms/shared/ui/json/ui_internal.h
  │   ├─    0.9 ms - platforms/shared/ui/json/checkbox.h
  │   ├─    0.9 ms - platforms/shared/ui/json/help.h
  │   └─    0.8 ms - platforms/shared/ui/json/number_field.h
  └─    6.1 ms - fl/stl/url.h
fl/stl/stdint.h (31.8ms)
  └─   31.5 ms - platforms/int.h
    └─   31.0 ms - platforms/shared/int.h
      └─   30.9 ms - platforms/shared/int_linux.h

TOP 20 SLOWEST OPERATIONS
--------------------------------------------------------------------------------
  1.  1248.1 ms - Source: FastLED.h
  2.  1248.1 ms - Total Source: 
  3.   724.1 ms - Total ParseClass: 
  4.   546.8 ms - Source: fl/task/executor.h
  5.   451.3 ms - Source: fl/fastled.h
  6.   352.1 ms - Source: fl/task/promise.h
  7.   302.4 ms - Source: fl/stl/function.h
  8.   280.1 ms - Source: crgb.h
  9.   278.8 ms - Source: fl/gfx/crgb.h
 10.   273.8 ms - Source: fl/math/ease.h
 11.   271.4 ms - Source: fl/math/fixed_point.h
 12.   222.5 ms - Total InstantiateFunction: 
 13.   193.2 ms - Source: fl/stl/shared_ptr.h
 14.   180.8 ms - Source: fl/task/scheduler.h
 15.   178.2 ms - Total InstantiateClass: 
 16.   171.2 ms - Source: fl/stl/singleton.h
 17.   170.5 ms - Source: fl/stl/thread_local.h
 18.   169.3 ms - Source: fl/stl/thread.h
 19.   169.2 ms - Source: platforms/thread.h
 20.   169.2 ms - Source: platforms/stub/thread_stub.h

PERFORMANCE FLAGS
--------------------------------------------------------------------------------
⚠️  SLOW HEADERS (>50.0ms):
    - FastLED.h (1248.1ms)
    - fl/task/executor.h (546.8ms)
    - fl/fastled.h (451.3ms)
    - fl/task/promise.h (352.1ms)
    - fl/stl/function.h (302.4ms)
    - crgb.h (280.1ms)
    - fl/gfx/crgb.h (278.8ms)
    - fl/math/ease.h (273.8ms)
    - fl/math/fixed_point.h (271.4ms)
    - fl/stl/shared_ptr.h (193.2ms)

⚠️  Template instantiation time is high (35.6% of total)
✓  Lexing time is acceptable (<10% of total)

RECOMMENDATIONS
--------------------------------------------------------------------------------
1. Consider optimizing FastLED.h (1248.1ms)
2. Consider optimizing fl/task/executor.h (546.8ms)
3. Consider optimizing fl/fastled.h (451.3ms)

================================================================================

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ci/autoresearch/gpio.py (1)

82-90: ⚠️ Potential issue | 🟡 Minor

Latent NameError: asyncio in the DTR-reset fallback path.

asyncio is not imported at the top of this file, but await asyncio.sleep(3.0) is called here (and again at line 276 in run_pin_discovery). If the initial ping fails and this recovery branch is taken, the fallback itself crashes with NameError before the retry client.connect() runs, turning a recoverable idle-device case into a hard failure — which is exactly the scenario the increased boot_wait=8.0 is intended to help with.

Also, after bumping the primary connect() to boot_wait=8.0 with the rationale above, the retry at line 90 (and line 284) is still boot_wait=3.0. Post-DTR-reset the device re-runs the same setup(), so the same race applies — consider using 8.0 here too for consistency.

🛠 Proposed fix
@@
 from dataclasses import dataclass
 from typing import TYPE_CHECKING
+import asyncio
@@
-                    await client.connect(boot_wait=3.0, drain_boot=True)
+                    await client.connect(boot_wait=8.0, drain_boot=True)

And analogously at line 284 in run_pin_discovery.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/autoresearch/gpio.py` around lines 82 - 90, The fallback DTR-reset path in
the GPIO logic calls await asyncio.sleep(...) but asyncio is not imported,
causing a NameError and hard-failing recovery; add "import asyncio" at the top
of the file and change the retry client.connect(...) calls in the DTR-reset
branch and in run_pin_discovery to use the same extended boot_wait value (use
8.0) as the primary connect so the post-reset setup has the same timeout; update
references to RpcClient.connect(boot_wait=3.0, ...) to
RpcClient.connect(boot_wait=8.0, ...) for consistency and ensure
run_pin_discovery uses asyncio.sleep as well.
🧹 Nitpick comments (2)
.gitignore (1)

114-117: Good additions; consider simplifying the log pattern.

Both entries are appropriate for .gitignore:

  • .claude/scheduled_tasks.lock correctly excludes the IDE lock file
  • .autoresearch_last.log provides explicit documentation for the AutoResearch log

However, note that .autoresearch_last.log is already covered by the existing ./*.log pattern on line 102. While the explicit entry serves as documentation, you might consider removing it to avoid redundancy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 114 - 117, Remove the redundant explicit
.autoresearch_last.log entry from .gitignore since it is already matched by the
existing ./*.log pattern; keep the .claude/scheduled_tasks.lock line (it’s not
covered by that pattern) and leave a comment only if you want documentation for
the log exclusion instead of duplicating the entry.
examples/AutoResearch/AutoResearchTest.cpp (1)

560-562: Tolerance widening to 200 ns for wave3 deserves a quick sanity check at the wave3 tick width.

Wave3 tick width is period/3 (~417 ns for an 800 kHz chipset), versus ~125 ns for wave8. A ±200 ns tolerance on a 417 ns tick is ~48% of one tick, which is workable but tighter relative to bit-width than the wave8 case (200 ns / 125 ns ≈ 160%). On the other hand, a wave3-encoded "0" pulse may be only 1*tick = ~417ns wide, so 200 ns leaves a 217 ns floor before false positives against random noise — verify against your captured ESP32-S3 traces that the 4/4 pass margin isn't accidentally narrow here.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/AutoResearch/AutoResearchTest.cpp` around lines 560 - 562, The
hardcoded tolerance set by the const uint32_t tolerance = (uses_wave8 ||
uses_wave3) ? 200 : 170; is unsafe for wave3 because wave3 tick_width = period/3
is much larger than wave8/8; instead compute tolerance relative to the actual
tick width: calculate tick_width = period / (uses_wave3 ? 3 : 8) and set
tolerance using a bounded fraction of that tick (e.g., tolerance =
std::min(200u, static_cast<uint32_t>(tick_width / 2)) for wave3, and keep 200
for wave8 or 170 for others), updating the code that references tolerance and
ensuring variables period, uses_wave3, uses_wave8 and tolerance are used
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ci/autoresearch/phases.py`:
- Around line 199-208: Update the failing test_lcd_forces_esp32s3 to assert the
actual driver name appended by phases.py: replace the assertion that checks for
"I2S" in result.drivers with an assertion that "LCD_CLOCKLESS" is in
result.drivers (keep using the same test function name test_lcd_forces_esp32s3
and the same result.drivers reference).

In `@examples/AutoResearch/AutoResearchTest.cpp`:
- Around line 534-556: The host-side Wave3 quantization recomputes
ticks_bit0/ticks_bit1 and builds tx_timing in the uses_wave3 branch but lacks a
defensive validation: add a check after computing ticks_bit0 and ticks_bit1 (in
the same block that computes actual_t0h/actual_t1h and tx_timing) to ensure
ticks_bit0 and ticks_bit1 are within the expected range (1..2) and are distinct
(matching canUseWave3 semantics); if the guard fails, log an error/warning (use
FL_WARN or FL_ERROR) and fall back to a safe non-wave3 path or abort the wave3
assignment so tx_timing is not set with degenerate values. Ensure the check
references uses_wave3, ticks_bit0, ticks_bit1, and tx_timing so it’s easy to
locate and maintain.

In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`:
- Around line 373-384: The current defaulting of config.clock_gpio and
config.dc_gpio to 0 can collide with active data lanes (e.g., when
channels[i]->getPin() == 0); update the block that sets config.clock_gpio and
config.dc_gpio so it first scans config.data_gpios (and/or channels[]) to pick a
fallback pin that does not appear in data_gpios, and if no safe unused pad can
be found emit an FL_WARN documenting the overlap and chosen fallback; ensure you
reference and check config.data_gpios, config.clock_gpio, config.dc_gpio and
channels[i]->getPin() when implementing this guard and add a short comment
explaining the constraint.

---

Outside diff comments:
In `@ci/autoresearch/gpio.py`:
- Around line 82-90: The fallback DTR-reset path in the GPIO logic calls await
asyncio.sleep(...) but asyncio is not imported, causing a NameError and
hard-failing recovery; add "import asyncio" at the top of the file and change
the retry client.connect(...) calls in the DTR-reset branch and in
run_pin_discovery to use the same extended boot_wait value (use 8.0) as the
primary connect so the post-reset setup has the same timeout; update references
to RpcClient.connect(boot_wait=3.0, ...) to RpcClient.connect(boot_wait=8.0,
...) for consistency and ensure run_pin_discovery uses asyncio.sleep as well.

---

Nitpick comments:
In @.gitignore:
- Around line 114-117: Remove the redundant explicit .autoresearch_last.log
entry from .gitignore since it is already matched by the existing ./*.log
pattern; keep the .claude/scheduled_tasks.lock line (it’s not covered by that
pattern) and leave a comment only if you want documentation for the log
exclusion instead of duplicating the entry.

In `@examples/AutoResearch/AutoResearchTest.cpp`:
- Around line 560-562: The hardcoded tolerance set by the const uint32_t
tolerance = (uses_wave8 || uses_wave3) ? 200 : 170; is unsafe for wave3 because
wave3 tick_width = period/3 is much larger than wave8/8; instead compute
tolerance relative to the actual tick width: calculate tick_width = period /
(uses_wave3 ? 3 : 8) and set tolerance using a bounded fraction of that tick
(e.g., tolerance = std::min(200u, static_cast<uint32_t>(tick_width / 2)) for
wave3, and keep 200 for wave8 or 170 for others), updating the code that
references tolerance and ensuring variables period, uses_wave3, uses_wave8 and
tolerance are used consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fde830ac-74da-49f8-9773-78699092a001

📥 Commits

Reviewing files that changed from the base of the PR and between c57bcec and e9c0353.

📒 Files selected for processing (6)
  • .gitignore
  • ci/autoresearch/args.py
  • ci/autoresearch/gpio.py
  • ci/autoresearch/phases.py
  • examples/AutoResearch/AutoResearchTest.cpp
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp

Comment thread ci/autoresearch/phases.py
Comment on lines +199 to +208
drivers = [
"PARLIO",
"RMT",
"SPI",
"UART",
"LCD_CLOCKLESS",
"LCD_SPI",
"LCD_RGB",
"OBJECTFLED",
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find any remaining references to the old "I2S" driver string in the autoresearch
# pipeline / firmware that may need to be updated to LCD_CLOCKLESS / LCD_SPI.
rg -nP -C2 '"I2S"' --type=py --type=cpp --type=c
rg -nP -C2 '\bLCD_CLOCKLESS\b|\bLCD_SPI\b' --type=py --type=cpp --type=c

Repository: FastLED/FastLED

Length of output: 21026


🏁 Script executed:

head -n 310 ci/tests/test_autoresearch_phases.py | tail -n 20

Repository: FastLED/FastLED

Length of output: 965


🏁 Script executed:

grep -n "I2S\|LCD_CLOCKLESS\|LCD_SPI" ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 101


🏁 Script executed:

sed -n '290,310p' ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 1004


🏁 Script executed:

sed -n '195,225p' ci/autoresearch/phases.py

Repository: FastLED/FastLED

Length of output: 858


🏁 Script executed:

grep -n 'assert.*"I2S"' ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 101


🏁 Script executed:

grep -n 'assert.*LCD_CLOCKLESS\|assert.*LCD_SPI' ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 41


🏁 Script executed:

grep -rn 'assert.*in.*drivers\|"I2S".*drivers' ci/tests/ --type=py

Repository: FastLED/FastLED

Length of output: 179


🏁 Script executed:

# Check if there are other tests or code paths that consume the drivers list
grep -rn 'result\.drivers\|\.drivers\[' ci/tests/ --type=py -A 2 -B 2

Repository: FastLED/FastLED

Length of output: 179


🏁 Script executed:

rg 'assert.*in.*drivers|"I2S".*drivers' ci/tests/ -A 2 -B 2

Repository: FastLED/FastLED

Length of output: 912


🏁 Script executed:

rg 'result\.drivers|\.drivers\[' ci/tests/ -A 2 -B 2

Repository: FastLED/FastLED

Length of output: 2288


🏁 Script executed:

sed -n '290,305p' ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 755


🏁 Script executed:

# Check the test method name to understand context better
sed -n '285,310p' ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 1214


🏁 Script executed:

# Check for any other test files that might reference I2S driver
rg -l '"I2S"' ci/tests/ --type py

Repository: FastLED/FastLED

Length of output: 95


🏁 Script executed:

# Check the complete test to understand what it's testing
sed -n '293,298p' ci/tests/test_autoresearch_phases.py

Repository: FastLED/FastLED

Length of output: 401


The test test_lcd_forces_esp32s3 will fail because it asserts the wrong driver name.

The test at line 298 of ci/tests/test_autoresearch_phases.py checks assert "I2S" in result.drivers, but phases.py line 219 now appends "LCD_CLOCKLESS" when args.lcd=True. Update the test assertion to assert "LCD_CLOCKLESS" in result.drivers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/autoresearch/phases.py` around lines 199 - 208, Update the failing
test_lcd_forces_esp32s3 to assert the actual driver name appended by phases.py:
replace the assertion that checks for "I2S" in result.drivers with an assertion
that "LCD_CLOCKLESS" is in result.drivers (keep using the same test function
name test_lcd_forces_esp32s3 and the same result.drivers reference).

Comment on lines +534 to +556
} else if (uses_wave3) {
// Wave3 encoding: 3 ticks per LED bit, clock = 3/(T1+T2+T3) Hz
const uint32_t period = timing.t1_ns + timing.t2_ns + timing.t3_ns;
const uint32_t tick_ns = period / 3;
const uint32_t ticks_bit0 = static_cast<uint32_t>(
static_cast<float>(timing.t1_ns) / period * 3.0f + 0.5f);
const uint32_t ticks_bit1 = static_cast<uint32_t>(
static_cast<float>(timing.t1_ns + timing.t2_ns) / period * 3.0f + 0.5f);
const uint32_t actual_t0h = ticks_bit0 * tick_ns;
const uint32_t actual_t1h = ticks_bit1 * tick_ns;
const uint32_t actual_period = 3 * tick_ns;
tx_timing = fl::ChipsetTiming{
actual_t0h,
actual_t1h - actual_t0h,
actual_period - actual_t1h,
timing.reset_us,
"LCD_CLOCKLESS_wave3"
};
FL_WARN("[RX TIMING] LCD_CLOCKLESS_wave3: ticks_bit0=" << ticks_bit0
<< " ticks_bit1=" << ticks_bit1
<< " tick_ns=" << tick_ns
<< " -> T1=" << tx_timing.T1 << " T2=" << tx_timing.T2
<< " T3=" << tx_timing.T3);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect canUseWave3 to confirm it rules out the degenerate cases above
# (ticks_bit0 == 0, ticks_bit1 == ticks_bit0, ticks_bit1 == 3).
ast-grep --pattern $'bool canUseWave3($$$) {
  $$$
}'
rg -nP -C5 '\bcanUseWave3\b'

Repository: FastLED/FastLED

Length of output: 15249


🏁 Script executed:

sed -n '25,60p' src/fl/channels/wave3.cpp.hpp

Repository: FastLED/FastLED

Length of output: 1338


🏁 Script executed:

sed -n '480,560p' examples/AutoResearch/AutoResearchTest.cpp

Repository: FastLED/FastLED

Length of output: 4723


Add defensive check to catch degenerate Wave3 quantization values.

The canUseWave3() check at line 498 validates that the quantized ticks_bit0 and ticks_bit1 fall within valid ranges [1, 2] and are distinct. However, the host recalculation at lines 537–538 performs the same quantization without re-validating, relying entirely on the firmware's eligibility check. While the mathematical guarantees should hold (since the formula and rounding are identical), adding an explicit check would provide defensive protection against:

  • Future changes to canUseWave3() that don't account for all edge cases
  • Subtle divergence between firmware quantization logic (used in actual drivers) and host quantization logic (used here for RX threshold reconstruction)
Suggested guard
         const uint32_t ticks_bit0 = static_cast<uint32_t>(
             static_cast<float>(timing.t1_ns) / period * 3.0f + 0.5f);
         const uint32_t ticks_bit1 = static_cast<uint32_t>(
             static_cast<float>(timing.t1_ns + timing.t2_ns) / period * 3.0f + 0.5f);
+        if (ticks_bit0 == 0 || ticks_bit1 <= ticks_bit0 || ticks_bit1 >= 3) {
+            FL_WARN("[RX TIMING] LCD_CLOCKLESS_wave3: degenerate quantization "
+                    "(ticks_bit0=" << ticks_bit0 << " ticks_bit1=" << ticks_bit1
+                    << ") — host/firmware canUseWave3() may be out of sync");
+        }
         const uint32_t actual_t0h = ticks_bit0 * tick_ns;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/AutoResearch/AutoResearchTest.cpp` around lines 534 - 556, The
host-side Wave3 quantization recomputes ticks_bit0/ticks_bit1 and builds
tx_timing in the uses_wave3 branch but lacks a defensive validation: add a check
after computing ticks_bit0 and ticks_bit1 (in the same block that computes
actual_t0h/actual_t1h and tx_timing) to ensure ticks_bit0 and ticks_bit1 are
within the expected range (1..2) and are distinct (matching canUseWave3
semantics); if the guard fails, log an error/warning (use FL_WARN or FL_ERROR)
and fall back to a safe non-wave3 path or abort the wave3 assignment so
tx_timing is not set with degenerate values. Ensure the check references
uses_wave3, ticks_bit0, ticks_bit1, and tx_timing so it’s easy to locate and
maintain.

Comment on lines +373 to 384
// PCLK and DC pins are required by the LCD I80 bus API but the
// signals are not connected to LEDs for clockless output (data
// streams out on data_gpios). Use GPIO 0 for both (same convention
// as the legacy I2S LCD_CAM driver this replaces — proven safe on
// ESP32-S3 because the strapping pin tolerates being multiplexed
// to unused peripheral functions).
if (config.clock_gpio < 0) {
config.clock_gpio = 21;
config.clock_gpio = 0;
}
if (config.dc_gpio < 0) {
config.dc_gpio = 22; // another unused GPIO
config.dc_gpio = 0;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Potential pin collision when a user assigns GPIO 0 as a data lane.

The fix to default clock_gpio/dc_gpio to 0 resolves the ESP32-S3 boot crash, but it now silently overlaps with data_gpios if the caller assigns GPIO 0 to one of the lanes (e.g., channels[i]->getPin() == 0). Three signals would then be muxed onto the same pad, which can corrupt the data stream on that lane without an obvious diagnostic. Consider either:

  • Picking a guaranteed-unused fallback by scanning config.data_gpios[] and avoiding any pin already assigned, or
  • Emitting an FL_WARN when the chosen dummy pin overlaps with an active data lane.

A quick guard would also document the constraint for future readers.

🛡️ Suggested guard
         if (config.clock_gpio < 0) {
             config.clock_gpio = 0;
         }
         if (config.dc_gpio < 0) {
             config.dc_gpio = 0;
         }
+        // Warn if the dummy pins collide with an active data lane.
+        for (size_t i = 0; i < channels.size() && i < 16; i++) {
+            int p = config.data_gpios[i];
+            if (p == config.clock_gpio || p == config.dc_gpio) {
+                FL_WARN("ChannelDriverLcdClockless: data_gpios["
+                        << i << "]=" << p
+                        << " collides with dummy PCLK/DC pin");
+            }
+        }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`
around lines 373 - 384, The current defaulting of config.clock_gpio and
config.dc_gpio to 0 can collide with active data lanes (e.g., when
channels[i]->getPin() == 0); update the block that sets config.clock_gpio and
config.dc_gpio so it first scans config.data_gpios (and/or channels[]) to pick a
fallback pin that does not appear in data_gpios, and if no safe unused pad can
be found emit an FL_WARN documenting the overlap and chosen fallback; ensure you
reference and check config.data_gpios, config.clock_gpio, config.dc_gpio and
channels[i]->getPin() when implementing this guard and add a short comment
explaining the constraint.

Both ChannelDriverLcdClockless and ChannelDriverLcdSpi destructors had
an "intentional leak" branch that skipped freeRingBuffers() whenever
waitTransmitDone() returned false, on the theory that DMA might still
be reading the buffers.

In the unit-test mocks (LcdSpiPeripheralMock), waitTransmitDone()
returns false immediately whenever mPendingTransmits > 0 — so any test
that does not explicitly drain via simulateTransmitComplete() hits the
leak path, and LeakSanitizer (active in CI --debug runs) rejects the
test.

A 2 s stall on real hardware already indicates the DMA is lost; the
leak-to-be-safe strategy never actually helps production code and it
strictly breaks tests. Free unconditionally and log a warning instead.

Both failing CI jobs pass locally:
  bash test channel_driver_lcd_clockless --debug --clean   PASS
  bash test channel_driver_lcd_spi --debug                 PASS

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

📊 Header Compilation Performance

Total Time: 1202.41ms

Top 5 Slowest Headers

  1. FastLED.h - 918.62ms
  2. fl/fastled.h - 398.70ms
  3. fl/task/executor.h - 301.79ms
  4. crgb.h - 230.38ms
  5. fl/gfx/crgb.h - 228.91ms

Warnings

⚠️ Header FastLED.h exceeds 150ms (918.6ms)
⚠️ Header fl/fastled.h exceeds 150ms (398.7ms)
⚠️ Header fl/task/executor.h exceeds 150ms (301.8ms)
⚠️ Header crgb.h exceeds 150ms (230.4ms)
⚠️ Header fl/gfx/crgb.h exceeds 150ms (228.9ms)
⚠️ Header fl/math/ease.h exceeds 150ms (223.5ms)
⚠️ Header fl/math/fixed_point.h exceeds 150ms (221.1ms)
⚠️ Header fl/task/scheduler.h exceeds 150ms (157.7ms)
⚠️ Header fl/stl/singleton.h exceeds 50ms (147.5ms)
⚠️ Header fl/stl/thread_local.h exceeds 50ms (146.8ms)
⚠️ Header fl/stl/thread.h exceeds 50ms (145.6ms)
⚠️ Header platforms/thread.h exceeds 50ms (145.5ms)
⚠️ Header platforms/stub/thread_stub.h exceeds 50ms (145.4ms)
⚠️ Header platforms/stub/thread_stub_stl.h exceeds 50ms (145.4ms)
⚠️ Header fl/task/promise.h exceeds 50ms (129.8ms)
⚠️ Header fl/ui.h exceeds 50ms (121.9ms)
⚠️ Header fl/stl/function.h exceeds 50ms (80.3ms)
⚠️ Header fl/stl/json.h exceeds 50ms (78.7ms)
⚠️ Header fl/math/fixed_point/s4x12.h exceeds 50ms (69.7ms)
⚠️ Header fl/stl/json/types.h exceeds 50ms (61.1ms)
⚠️ Header platforms.h exceeds 50ms (56.8ms)
⚠️ Header platforms/stub/fastled_stub.h exceeds 50ms (56.7ms)
⚠️ Template instantiation time is high (52.2%)

Full Report
================================================================================
FASTLED COMPILATION PERFORMANCE REPORT
================================================================================
Generated: 2026-04-17 20:02:01
Compiler: clang++-17
File: ci/perf/test_compile.cpp

SUMMARY
--------------------------------------------------------------------------------
Total Compilation Time:    2,824.25 ms
Frontend Time:             17.22 ms (0.6%)
Backend Time:              195.46 ms (6.9%)

COMPILATION PHASES
--------------------------------------------------------------------------------
Source                    19119.09 ms (677.0%)
Templates                   608.55 ms ( 21.5%)

FASTLED HEADERS (Level 1 - Direct Includes)
--------------------------------------------------------------------------------
  2111.9 ms - FastLED.h (SLOW)
  1284.3 ms - fl/task/executor.h (SLOW)
   747.1 ms - fl/task/scheduler.h (SLOW)
   737.7 ms - fl/stl/singleton.h (SLOW)
   736.9 ms - fl/stl/thread_local.h (SLOW)
   735.8 ms - fl/stl/thread.h (SLOW)
   735.7 ms - platforms/thread.h (SLOW)
   735.6 ms - platforms/stub/thread_stub.h (SLOW)
   735.6 ms - platforms/stub/thread_stub_stl.h (SLOW)
   583.7 ms - fl/fastled.h (SLOW)
   523.6 ms - fl/task/promise.h (SLOW)
   474.7 ms - fl/stl/function.h (SLOW)
   304.4 ms - crgb.h (SLOW)
   303.1 ms - fl/gfx/crgb.h (SLOW)
   298.1 ms - fl/math/ease.h (SLOW)
   295.7 ms - fl/math/fixed_point.h (SLOW)
   180.9 ms - fl/stl/shared_ptr.h (SLOW)
   169.8 ms - platforms.h (SLOW)
   169.7 ms - platforms/stub/fastled_stub.h (SLOW)
   150.2 ms - fl/stl/type_traits.h (SLOW)

FASTLED HEADERS (Nested Includes - Up to 10 Levels)
--------------------------------------------------------------------------------
FastLED.h (2111.9ms)
  ├─ 1284.3 ms - fl/task/executor.h
  │ ├─  747.1 ms - fl/task/scheduler.h
  │ │ ├─  737.7 ms - fl/stl/singleton.h
  │ │ │ └─  736.9 ms - fl/stl/thread_local.h
  │ │ │   └─  735.8 ms - fl/stl/thread.h
  │ │ │     └─  735.7 ms - platforms/thread.h
  │ │ │       └─  735.6 ms - platforms/stub/thread_stub.h
  │ │ │         └─  735.6 ms - platforms/stub/thread_stub_stl.h
  │ │ │           └─  717.4 ms - thread
  │ │ │             ├─  406.9 ms - std_thread.h
  │ │ │             └─  255.0 ms - this_thread_sleep.h
  │ │ └─    8.6 ms - fl/task/task.h
  │ │   └─    3.5 ms - fl/trace.h
  │ │     ├─    2.2 ms - fl/stl/chrono.h
  │ │     └─    1.0 ms - fl/stl/tuple.h
  │ ├─  523.6 ms - fl/task/promise.h
  │ │ ├─  474.7 ms - fl/stl/function.h
  │ │ │ ├─  180.9 ms - fl/stl/shared_ptr.h
  │ │ │ │ ├─  150.2 ms - fl/stl/type_traits.h
  │ │ │ │ │ └─  143.7 ms - fl/stl/move.h
  │ │ │ │ ├─   25.7 ms - fl/stl/atomic.h
  │ │ │ │ │ └─   24.7 ms - platforms/atomic.h
  │ │ │ │ │   └─   24.7 ms - platforms/shared/atomic.h
  │ │ │ │ └─    0.8 ms - fl/stl/bit_cast.h
  │ │ │ ├─  146.1 ms - fl/stl/vector.h
  │ │ │ │ ├─   97.9 ms - fl/math/math.h
  │ │ │ │ │ └─   92.2 ms - fl/stl/undef.h
  │ │ │ │ │   └─  108.9 ms - stdlib.h
  │ │ │ │ │     ├─   54.8 ms - cstdlib
  │ │ │ │ │     │ └─  108.9 ms - stdlib.h
  │ │ │ │ │     │   ├─   54.8 ms - cstdlib
  │ │ │ │ │     │   ├─   10.9 ms - types.h
  │ │ │ │ │     │   └─    0.7 ms - floatn.h
  │ │ │ │ │     ├─   10.9 ms - types.h
  │ │ │ │ │     │ ├─   10.9 ms - types.h
  │ │ │ │ │     │ │ ├─   10.9 ms - types.h
  │ │ │ │ │     │ │ ├─    2.0 ms - pthreadtypes.h
  │ │ │ │ │     │ │ ├─    1.9 ms - select.h
  │ │ │ │ │     │ │ └─    1.6 ms - endian.h
  │ │ │ │ │     │ ├─    2.0 ms - pthreadtypes.h
  │ │ │ │ │     │ │ └─    1.5 ms - thread-shared-types.h
  │ │ │ │ │     │ ├─    1.9 ms - select.h
  │ │ │ │ │     │ └─    1.6 ms - endian.h
  │ │ │ │ │     └─    0.7 ms - floatn.h
  │ │ │ │ ├─   18.7 ms - fl/stl/initializer_list.h
  │ │ │ │ ├─   18.6 ms - fl/stl/allocator.h
  │ │ │ │ │ └─   12.8 ms - fl/stl/bitset.h
  │ │ │ │ │   └─    8.2 ms - fl/stl/bitset_dynamic.h
  │ │ │ │ │     └─    2.2 ms - fl/stl/unique_ptr.h
  │ │ │ │ ├─    2.8 ms - fl/stl/basic_vector.h
  │ │ │ │ └─    0.7 ms - fl/stl/functional.h
  │ │ │ ├─  118.9 ms - fl/stl/variant.h
  │ │ │ │ └─  116.9 ms - fl/stl/new.h
  │ │ │ │   └─  116.9 ms - platforms/new.h
  │ │ │ │     └─  116.8 ms - platforms/shared/new.h
  │ │ │ │       └─   95.2 ms - new
  │ │ │ │         ├─   39.5 ms - c++config.h
  │ │ │ │         │ └─    5.3 ms - os_defines.h
  │ │ │ │         └─    0.7 ms - version.h
  │ │ │ ├─   18.6 ms - fl/stl/compiler_control.h
  │ │ │ └─    4.7 ms - fl/stl/algorithm.h
  │ │ │   └─    2.0 ms - fl/math/random.h
  │ │ │     └─    0.9 ms - fl/math/random8.h
  │ │ └─   43.8 ms - fl/stl/string.h
  │ │   ├─   12.8 ms - fl/stl/basic_string.h
  │ │   │ ├─    1.1 ms - fl/stl/not_null.h
  │ │   │ ├─    0.9 ms - fl/stl/iterator.h
  │ │   │ └─    0.5 ms - fl/stl/charconv.h
  │ │   ├─    8.7 ms - fl/stl/span.h
  │ │   │ └─    3.4 ms - fl/math/geometry.h
  │ │   ├─    5.7 ms - fl/stl/string_view.h
  │ │   └─    1.5 ms - fl/stl/optional.h
  │ ├─   11.4 ms - platforms/await.h
  │ │ └─   10.9 ms - platforms/coroutine_runtime.h
  │ │   └─    9.4 ms - fl/system/engine_events.h
  │ │     ├─    4.9 ms - fl/math/screenmap.h
  │ │     │ └─    3.6 ms - fl/stl/flat_map.h
  │ │     └─    3.0 ms - fl/math/xymap.h
  │ │       └─    0.8 ms - fl/math/lut.h
  │ └─    0.8 ms - fl/task/promise_result.h
  ├─  583.7 ms - fl/fastled.h
  │ ├─  304.4 ms - crgb.h
  │ │ ├─  303.1 ms - fl/gfx/crgb.h
  │ │ │ └─  298.1 ms - fl/math/ease.h
  │ │ │   └─  295.7 ms - fl/math/fixed_point.h
  │ │ │     ├─  149.4 ms - fl/math/fixed_point/s4x12.h
  │ │ │     │ ├─  129.0 ms - fl/math/sin32.h
  │ │ │     │ │ └─  125.8 ms - fl/math/simd.h
  │ │ │     │ │   └─  125.2 ms - fl/math/simd/types.h
  │ │ │     │ │     └─  124.9 ms - platforms/simd.h
  │ │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │ │     │ └─    0.7 ms - fl/math/fixed_point/isqrt.h
  │ │ │     ├─   18.4 ms - fl/math/fixed_point/s16x16.h
  │ │ │     ├─   18.4 ms - fl/math/fixed_point/s8x24.h
  │ │ │     ├─   18.3 ms - fl/math/fixed_point/s8x8.h
  │ │ │     └─   18.0 ms - fl/math/fixed_point/s24x8.h
  │ │ └─    0.9 ms - chsv.h
  │ │   └─    0.8 ms - fl/gfx/hsv.h
  │ ├─  169.8 ms - platforms.h
  │ │ └─  169.7 ms - platforms/stub/fastled_stub.h
  │ │   ├─  132.5 ms - platforms/stub/fastspi_stub.h
  │ │   │ └─  132.5 ms - platforms/stub/fastspi_stub_generic.h
  │ │   │   ├─  126.0 ms - platforms/shared/active_strip_data/active_strip_data.h
  │ │   │   │ └─  123.8 ms - fl/id_tracker.h
  │ │   │   │   └─  122.8 ms - fl/stl/mutex.h
  │ │   │   │     └─  122.7 ms - platforms/mutex.h
  │ │   │   │       └─  122.6 ms - platforms/stub/mutex_stub.h
  │ │   │   └─    6.1 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │ │   └─   37.1 ms - platforms/stub/clockless_stub.h
  │ │     └─   37.1 ms - platforms/stub/clockless_channel_stub.h
  │ │       ├─   13.3 ms - fl/system/log.h
  │ │       │ └─   12.8 ms - fl/stl/strstream.h
  │ │       ├─   13.1 ms - fl/channels/data.h
  │ │       │ └─    9.8 ms - fl/channels/config.h
  │ │       │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │ │       │   │ └─    1.4 ms - fl/chipsets/led_timing.h
  │ │       │   └─    1.7 ms - fl/chipsets/spi.h
  │ │       ├─    2.4 ms - fl/channels/manager.h
  │ │       ├─    1.6 ms - fl/stl/weak_ptr.h
  │ │       └─    1.1 ms - fl/channels/driver.h
  │ ├─   41.6 ms - colorutils.h
  │ │ └─   40.8 ms - fl/gfx/colorutils.h
  │ │   ├─    8.8 ms - fl/gfx/blur.h
  │ │   │ └─    4.6 ms - fl/gfx/canvas.h
  │ │   │   └─    2.9 ms - fl/math/alpha.h
  │ │   └─    3.1 ms - fl/gfx/fill.h
  │ ├─   23.5 ms - pixel_controller.h
  │ │ ├─   16.9 ms - pixel_iterator.h
  │ │ │ └─   16.9 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │ │   ├─    5.0 ms - fl/chipsets/encoders/apa102.h
  │ │ │   │ └─    3.9 ms - fl/chipsets/encoders/encoder_utils.h
  │ │ │   │   └─    3.2 ms - fl/gfx/gamma_lut.h
  │ │ │   ├─    4.4 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │ │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │ │ │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │ │ └─    2.6 ms - rgbw.h
  │ │   └─    2.4 ms - fl/gfx/rgbw.h
  │ └─   22.7 ms - pixeltypes.h
  │   ├─   19.0 ms - lib8tion.h
  │   │ ├─    9.8 ms - fl/math/math8.h
  │   │ │ ├─    5.2 ms - fl/math/intmap.h
  │   │ │ │ └─    4.1 ms - platforms/intmap.h
  │   │ │ ├─    2.5 ms - fl/math/scale8.h
  │   │ │ │ └─    2.4 ms - platforms/scale8.h
  │   │ │ │   └─    1.0 ms - platforms/shared/scale8.h
  │   │ │ └─    2.1 ms - platforms/math8.h
  │   │ │   └─    1.7 ms - platforms/shared/math8.h
  │   │ ├─    2.0 ms - fl/math/beat.h
  │   │ │ └─    1.0 ms - fl/math/trig8.h
  │   │ │   └─    1.0 ms - platforms/trig8.h
  │   │ │     └─    0.9 ms - platforms/shared/trig8.h
  │   │ └─    0.5 ms - fl/math/time_functions.h
  │   └─    3.2 ms - crgb.hpp
  ├─  119.7 ms - fl/ui.h
  │ ├─   77.2 ms - fl/stl/json.h
  │ │ └─   59.8 ms - fl/stl/json/types.h
  │ │   └─    7.5 ms - fl/stl/limits.h
  │ ├─   10.3 ms - fl/ui_impl.h
  │ │ └─    9.7 ms - platforms/ui_defs.h
  │ │   ├─    2.1 ms - platforms/shared/ui/json/audio.h
  │ │   │ └─    1.0 ms - platforms/shared/ui/json/audio_internal.h
  │ │   ├─    1.5 ms - platforms/shared/ui/json/button.h
  │ │   │ └─    0.6 ms - platforms/shared/ui/json/ui_internal.h
  │ │   ├─    0.9 ms - platforms/shared/ui/json/checkbox.h
  │ │   ├─    0.9 ms - platforms/shared/ui/json/help.h
  │ │   └─    0.9 ms - platforms/shared/ui/json/dropdown.h
  │ └─    6.0 ms - fl/stl/url.h
  ├─   28.1 ms - chipsets.h
  │ ├─   11.5 ms - fl/chipsets/ucs7604.h
  │ │ └─    8.7 ms - fl/chipsets/encoders/ucs7604.h
  │ ├─    6.6 ms - fl/chipsets/apa102.h
  │ ├─    1.7 ms - fl/chipsets/lpd880x.h
  │ ├─    1.0 ms - fl/chipsets/encoders/ws2816.h
  │ └─    0.8 ms - fl/chipsets/p9813.h
  └─   24.6 ms - fl/stl/stdint.h
    └─   24.3 ms - platforms/int.h
      └─   23.8 ms - platforms/shared/int.h
        └─   23.6 ms - platforms/shared/int_linux.h
fl/task/executor.h (1284.3ms)
  ├─  747.1 ms - fl/task/scheduler.h
  │ ├─  737.7 ms - fl/stl/singleton.h
  │ │ └─  736.9 ms - fl/stl/thread_local.h
  │ │   └─  735.8 ms - fl/stl/thread.h
  │ │     └─  735.7 ms - platforms/thread.h
  │ │       └─  735.6 ms - platforms/stub/thread_stub.h
  │ │         └─  735.6 ms - platforms/stub/thread_stub_stl.h
  │ │           └─  717.4 ms - thread
  │ │             ├─  406.9 ms - std_thread.h
  │ │             │ ├─  124.7 ms - tuple
  │ │             │ ├─   95.3 ms - iosfwd
  │ │             │ ├─   58.3 ms - refwrap.h
  │ │             │ ├─   12.3 ms - gthr.h
  │ │             │ └─    6.4 ms - unique_ptr.h
  │ │             └─  255.0 ms - this_thread_sleep.h
  │ │               ├─  212.2 ms - chrono.h
  │ │               └─    4.2 ms - cerrno
  │ └─    8.6 ms - fl/task/task.h
  │   └─    3.5 ms - fl/trace.h
  │     ├─    2.2 ms - fl/stl/chrono.h
  │     └─    1.0 ms - fl/stl/tuple.h
  ├─  523.6 ms - fl/task/promise.h
  │ ├─  474.7 ms - fl/stl/function.h
  │ │ ├─  180.9 ms - fl/stl/shared_ptr.h
  │ │ │ ├─  150.2 ms - fl/stl/type_traits.h
  │ │ │ │ └─  143.7 ms - fl/stl/move.h
  │ │ │ ├─   25.7 ms - fl/stl/atomic.h
  │ │ │ │ └─   24.7 ms - platforms/atomic.h
  │ │ │ │   └─   24.7 ms - platforms/shared/atomic.h
  │ │ │ └─    0.8 ms - fl/stl/bit_cast.h
  │ │ ├─  146.1 ms - fl/stl/vector.h
  │ │ │ ├─   97.9 ms - fl/math/math.h
  │ │ │ │ └─   92.2 ms - fl/stl/undef.h
  │ │ │ │   └─  108.9 ms - stdlib.h
  │ │ │ │     ├─   54.8 ms - cstdlib
  │ │ │ │     │ └─  108.9 ms - stdlib.h
  │ │ │ │     │   ├─   54.8 ms - cstdlib
  │ │ │ │     │   │ └─  108.9 ms - stdlib.h
  │ │ │ │     │   ├─   10.9 ms - types.h
  │ │ │ │     │   │ ├─   10.9 ms - types.h
  │ │ │ │     │   │ ├─    2.0 ms - pthreadtypes.h
  │ │ │ │     │   │ ├─    1.9 ms - select.h
  │ │ │ │     │   │ └─    1.6 ms - endian.h
  │ │ │ │     │   └─    0.7 ms - floatn.h
  │ │ │ │     ├─   10.9 ms - types.h
  │ │ │ │     │ ├─   10.9 ms - types.h
  │ │ │ │     │ │ ├─   10.9 ms - types.h
  │ │ │ │     │ │ │ ├─   10.9 ms - types.h
  │ │ │ │     │ │ │ ├─    2.0 ms - pthreadtypes.h
  │ │ │ │     │ │ │ ├─    1.9 ms - select.h
  │ │ │ │     │ │ │ └─    1.6 ms - endian.h
  │ │ │ │     │ │ ├─    2.0 ms - pthreadtypes.h
  │ │ │ │     │ │ │ └─    1.5 ms - thread-shared-types.h
  │ │ │ │     │ │ ├─    1.9 ms - select.h
  │ │ │ │     │ │ └─    1.6 ms - endian.h
  │ │ │ │     │ ├─    2.0 ms - pthreadtypes.h
  │ │ │ │     │ │ └─    1.5 ms - thread-shared-types.h
  │ │ │ │     │ ├─    1.9 ms - select.h
  │ │ │ │     │ └─    1.6 ms - endian.h
  │ │ │ │     └─    0.7 ms - floatn.h
  │ │ │ ├─   18.7 ms - fl/stl/initializer_list.h
  │ │ │ ├─   18.6 ms - fl/stl/allocator.h
  │ │ │ │ └─   12.8 ms - fl/stl/bitset.h
  │ │ │ │   └─    8.2 ms - fl/stl/bitset_dynamic.h
  │ │ │ │     └─    2.2 ms - fl/stl/unique_ptr.h
  │ │ │ ├─    2.8 ms - fl/stl/basic_vector.h
  │ │ │ └─    0.7 ms - fl/stl/functional.h
  │ │ ├─  118.9 ms - fl/stl/variant.h
  │ │ │ └─  116.9 ms - fl/stl/new.h
  │ │ │   └─  116.9 ms - platforms/new.h
  │ │ │     └─  116.8 ms - platforms/shared/new.h
  │ │ │       └─   95.2 ms - new
  │ │ │         ├─   39.5 ms - c++config.h
  │ │ │         │ └─    5.3 ms - os_defines.h
  │ │ │         │   └─    4.8 ms - features.h
  │ │ │         └─    0.7 ms - version.h
  │ │ ├─   18.6 ms - fl/stl/compiler_control.h
  │ │ └─    4.7 ms - fl/stl/algorithm.h
  │ │   └─    2.0 ms - fl/math/random.h
  │ │     └─    0.9 ms - fl/math/random8.h
  │ └─   43.8 ms - fl/stl/string.h
  │   ├─   12.8 ms - fl/stl/basic_string.h
  │   │ ├─    1.1 ms - fl/stl/not_null.h
  │   │ ├─    0.9 ms - fl/stl/iterator.h
  │   │ └─    0.5 ms - fl/stl/charconv.h
  │   ├─    8.7 ms - fl/stl/span.h
  │   │ └─    3.4 ms - fl/math/geometry.h
  │   ├─    5.7 ms - fl/stl/string_view.h
  │   └─    1.5 ms - fl/stl/optional.h
  ├─   11.4 ms - platforms/await.h
  │ └─   10.9 ms - platforms/coroutine_runtime.h
  │   └─    9.4 ms - fl/system/engine_events.h
  │     ├─    4.9 ms - fl/math/screenmap.h
  │     │ └─    3.6 ms - fl/stl/flat_map.h
  │     └─    3.0 ms - fl/math/xymap.h
  │       └─    0.8 ms - fl/math/lut.h
  └─    0.8 ms - fl/task/promise_result.h
fl/fastled.h (583.7ms)
  ├─  304.4 ms - crgb.h
  │ ├─  303.1 ms - fl/gfx/crgb.h
  │ │ └─  298.1 ms - fl/math/ease.h
  │ │   └─  295.7 ms - fl/math/fixed_point.h
  │ │     ├─  149.4 ms - fl/math/fixed_point/s4x12.h
  │ │     │ ├─  129.0 ms - fl/math/sin32.h
  │ │     │ │ └─  125.8 ms - fl/math/simd.h
  │ │     │ │   └─  125.2 ms - fl/math/simd/types.h
  │ │     │ │     └─  124.9 ms - platforms/simd.h
  │ │     │ │       └─  124.9 ms - platforms/shared/simd_x86.hpp
  │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │     │ └─    0.7 ms - fl/math/fixed_point/isqrt.h
  │ │     ├─   18.4 ms - fl/math/fixed_point/s16x16.h
  │ │     ├─   18.4 ms - fl/math/fixed_point/s8x24.h
  │ │     ├─   18.3 ms - fl/math/fixed_point/s8x8.h
  │ │     └─   18.0 ms - fl/math/fixed_point/s24x8.h
  │ └─    0.9 ms - chsv.h
  │   └─    0.8 ms - fl/gfx/hsv.h
  ├─  169.8 ms - platforms.h
  │ └─  169.7 ms - platforms/stub/fastled_stub.h
  │   ├─  132.5 ms - platforms/stub/fastspi_stub.h
  │   │ └─  132.5 ms - platforms/stub/fastspi_stub_generic.h
  │   │   ├─  126.0 ms - platforms/shared/active_strip_data/active_strip_data.h
  │   │   │ └─  123.8 ms - fl/id_tracker.h
  │   │   │   └─  122.8 ms - fl/stl/mutex.h
  │   │   │     └─  122.7 ms - platforms/mutex.h
  │   │   │       └─  122.6 ms - platforms/stub/mutex_stub.h
  │   │   │         └─  122.6 ms - platforms/stub/mutex_stub_stl.h
  │   │   └─    6.1 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │   └─   37.1 ms - platforms/stub/clockless_stub.h
  │     └─   37.1 ms - platforms/stub/clockless_channel_stub.h
  │       ├─   13.3 ms - fl/system/log.h
  │       │ └─   12.8 ms - fl/stl/strstream.h
  │       ├─   13.1 ms - fl/channels/data.h
  │       │ └─    9.8 ms - fl/channels/config.h
  │       │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │       │   │ └─    1.4 ms - fl/chipsets/led_timing.h
  │       │   └─    1.7 ms - fl/chipsets/spi.h
  │       ├─    2.4 ms - fl/channels/manager.h
  │       ├─    1.6 ms - fl/stl/weak_ptr.h
  │       └─    1.1 ms - fl/channels/driver.h
  ├─   41.6 ms - colorutils.h
  │ └─   40.8 ms - fl/gfx/colorutils.h
  │   ├─    8.8 ms - fl/gfx/blur.h
  │   │ └─    4.6 ms - fl/gfx/canvas.h
  │   │   └─    2.9 ms - fl/math/alpha.h
  │   └─    3.1 ms - fl/gfx/fill.h
  ├─   23.5 ms - pixel_controller.h
  │ ├─   16.9 ms - pixel_iterator.h
  │ │ └─   16.9 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │   ├─    5.0 ms - fl/chipsets/encoders/apa102.h
  │ │   │ └─    3.9 ms - fl/chipsets/encoders/encoder_utils.h
  │ │   │   └─    3.2 ms - fl/gfx/gamma_lut.h
  │ │   ├─    4.4 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │ │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │ └─    2.6 ms - rgbw.h
  │   └─    2.4 ms - fl/gfx/rgbw.h
  └─   22.7 ms - pixeltypes.h
    ├─   19.0 ms - lib8tion.h
    │ ├─    9.8 ms - fl/math/math8.h
    │ │ ├─    5.2 ms - fl/math/intmap.h
    │ │ │ └─    4.1 ms - platforms/intmap.h
    │ │ ├─    2.5 ms - fl/math/scale8.h
    │ │ │ └─    2.4 ms - platforms/scale8.h
    │ │ │   └─    1.0 ms - platforms/shared/scale8.h
    │ │ └─    2.1 ms - platforms/math8.h
    │ │   └─    1.7 ms - platforms/shared/math8.h
    │ ├─    2.0 ms - fl/math/beat.h
    │ │ └─    1.0 ms - fl/math/trig8.h
    │ │   └─    1.0 ms - platforms/trig8.h
    │ │     └─    0.9 ms - platforms/shared/trig8.h
    │ └─    0.5 ms - fl/math/time_functions.h
    └─    3.2 ms - crgb.hpp
fl/ui.h (119.7ms)
  ├─   77.2 ms - fl/stl/json.h
  │ └─   59.8 ms - fl/stl/json/types.h
  │   └─    7.5 ms - fl/stl/limits.h
  ├─   10.3 ms - fl/ui_impl.h
  │ └─    9.7 ms - platforms/ui_defs.h
  │   ├─    2.1 ms - platforms/shared/ui/json/audio.h
  │   │ └─    1.0 ms - platforms/shared/ui/json/audio_internal.h
  │   ├─    1.5 ms - platforms/shared/ui/json/button.h
  │   │ └─    0.6 ms - platforms/shared/ui/json/ui_internal.h
  │   ├─    0.9 ms - platforms/shared/ui/json/checkbox.h
  │   ├─    0.9 ms - platforms/shared/ui/json/help.h
  │   └─    0.9 ms - platforms/shared/ui/json/dropdown.h
  └─    6.0 ms - fl/stl/url.h
chipsets.h (28.1ms)
  ├─   11.5 ms - fl/chipsets/ucs7604.h
  │ └─    8.7 ms - fl/chipsets/encoders/ucs7604.h
  ├─    6.6 ms - fl/chipsets/apa102.h
  ├─    1.7 ms - fl/chipsets/lpd880x.h
  ├─    1.0 ms - fl/chipsets/encoders/ws2816.h
  └─    0.8 ms - fl/chipsets/p9813.h

TOP 20 SLOWEST OPERATIONS
--------------------------------------------------------------------------------
  1.  2111.9 ms - Source: FastLED.h
  2.  2111.9 ms - Total Source: 
  3.  1284.3 ms - Source: fl/task/executor.h
  4.   747.1 ms - Source: fl/task/scheduler.h
  5.   737.7 ms - Source: fl/stl/singleton.h
  6.   736.9 ms - Source: fl/stl/thread_local.h
  7.   735.8 ms - Source: fl/stl/thread.h
  8.   735.7 ms - Source: platforms/thread.h
  9.   735.6 ms - Source: platforms/stub/thread_stub.h
 10.   735.6 ms - Source: platforms/stub/thread_stub_stl.h
 11.   717.4 ms - Source: thread
 12.   665.2 ms - Total ParseClass: 
 13.   583.7 ms - Source: fl/fastled.h
 14.   523.6 ms - Source: fl/task/promise.h
 15.   474.7 ms - Source: fl/stl/function.h
 16.   406.9 ms - Source: std_thread.h
 17.   304.4 ms - Source: crgb.h
 18.   303.1 ms - Source: fl/gfx/crgb.h
 19.   298.1 ms - Source: fl/math/ease.h
 20.   295.7 ms - Source: fl/math/fixed_point.h

PERFORMANCE FLAGS
--------------------------------------------------------------------------------
⚠️  SLOW HEADERS (>50.0ms):
    - FastLED.h (2111.9ms)
    - fl/task/executor.h (1284.3ms)
    - fl/task/scheduler.h (747.1ms)
    - fl/stl/singleton.h (737.7ms)
    - fl/stl/thread_local.h (736.9ms)
    - fl/stl/thread.h (735.8ms)
    - platforms/thread.h (735.7ms)
    - platforms/stub/thread_stub.h (735.6ms)
    - platforms/stub/thread_stub_stl.h (735.6ms)
    - fl/fastled.h (583.7ms)

⚠️  Template instantiation time is high (21.5% of total)
✓  Lexing time is acceptable (<10% of total)

RECOMMENDATIONS
--------------------------------------------------------------------------------
1. Consider optimizing FastLED.h (2111.9ms)
2. Consider optimizing fl/task/executor.h (1284.3ms)
3. Consider optimizing fl/task/scheduler.h (747.1ms)

================================================================================

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp (1)

381-386: ⚠️ Potential issue | 🟡 Minor

Pin collision when a data lane is assigned to GPIO 0.

Setting both clock_gpio and dc_gpio to 0 still silently overlaps with config.data_gpios[i] if any channel's pin is GPIO 0. Three signals muxed onto the same pad will corrupt that lane's output without diagnostics. A one-shot FL_WARN when the dummy pins collide with an active data lane would at least surface this to the user.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`
around lines 381 - 386, After defaulting config.clock_gpio and config.dc_gpio to
0, add a one-shot diagnostic that checks for collisions with any active data
lane: loop over config.data_gpios[] and if any element equals 0 while
config.clock_gpio==0 or config.dc_gpio==0, call FL_WARN once (use a static bool
or similar to ensure a single warning) with a clear message including which
dummy pin (clock or dc) collides and the data lane index; reference
config.clock_gpio, config.dc_gpio and config.data_gpios to locate where to
insert this check and use the existing FL_WARN logging macro for the warning.
🧹 Nitpick comments (1)
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp (1)

375-386: Mirror the GPIO 0 default for dc_gpio in channel_driver_lcd_spi.cpp.hpp.

The clockless driver now defaults dc_gpio to 0, but the SPI sibling at channel_driver_lcd_spi.cpp.hpp lines 337–339 still defaults to 21. Since both drivers route through the same LcdSpiPeripheralEsp (which falls back to GPIO 0 with a warning if unset), aligning the SPI driver's default to 0 would remove inconsistency and eliminate a latent safety issue, especially given the rationale that GPIO 21/22 are unsafe defaults on common ESP32-S3 packages.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`
around lines 375 - 386, The SPI LCD driver defaults dc_gpio to 21 which
conflicts with the clockless driver and the LcdSpiPeripheralEsp fallback; update
the default in channel_driver_lcd_spi.cpp.hpp so that when config.dc_gpio < 0 it
is set to 0 (mirror the change made for config.clock_gpio in the clockless
driver). Locate the dc_gpio assignment in the SPI driver (the config.dc_gpio
check near the existing config.clock_gpio handling) and change the fallback
value from 21 to 0 to match LcdSpiPeripheralEsp and the clockless driver
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`:
- Around line 381-386: After defaulting config.clock_gpio and config.dc_gpio to
0, add a one-shot diagnostic that checks for collisions with any active data
lane: loop over config.data_gpios[] and if any element equals 0 while
config.clock_gpio==0 or config.dc_gpio==0, call FL_WARN once (use a static bool
or similar to ensure a single warning) with a clear message including which
dummy pin (clock or dc) collides and the data lane index; reference
config.clock_gpio, config.dc_gpio and config.data_gpios to locate where to
insert this check and use the existing FL_WARN logging macro for the warning.

---

Nitpick comments:
In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`:
- Around line 375-386: The SPI LCD driver defaults dc_gpio to 21 which conflicts
with the clockless driver and the LcdSpiPeripheralEsp fallback; update the
default in channel_driver_lcd_spi.cpp.hpp so that when config.dc_gpio < 0 it is
set to 0 (mirror the change made for config.clock_gpio in the clockless driver).
Locate the dc_gpio assignment in the SPI driver (the config.dc_gpio check near
the existing config.clock_gpio handling) and change the fallback value from 21
to 0 to match LcdSpiPeripheralEsp and the clockless driver behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 712eb181-afac-402c-88fe-8e3e2388a969

📥 Commits

Reviewing files that changed from the base of the PR and between e9c0353 and e698263.

📒 Files selected for processing (2)
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_spi.cpp.hpp

@zackees
zackees merged commit 1ff63ba into master Apr 17, 2026
67 of 87 checks passed
@zackees
zackees deleted the fix-lcd-clockless-gpio-autoresearch branch April 17, 2026 22:25
@zackees zackees mentioned this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant