Repository navigation
fix(autoresearch): correct classic-ESP32 macro + gate pins 6/7/8 (follow-up to #3447) - #3448
Merged
Merged
Conversation
…low-up to #3447) PR #3447 attempted to gate `case 8:` in `LegacyClocklessProxy` behind a `#if defined(FL_IS_ESP_32) && !defined(<every variant>)` clause. Two bugs: 1. `FL_IS_ESP_32` is not a real macro. The actual classic-ESP32 sentinel is `FL_IS_ESP_32DEV` (see `src/platforms/esp/is_esp.h:68`). The gate never fired, so esp32dev compile still hit `_ESPPIN<8, 256, false>::validpin() == false`. 2. Even with the right macro, only gating pin 8 isn't enough — classic ESP32's `FASTLED_UNUSABLE_PIN_MASK` covers pins {6, 7, 8, 9, 10, 11, 20} (SPI flash SD0/SD1/SD2/SD3/CMD/CLK pads + GPIO20). LegacyClocklessProxy iterates pins 0-8 so the SK6812/WS2812B instantiations on pins 6 and 7 were still failing the static_assert. Fix: introduce `AUTORESEARCH_LEGACY_SUPPORTS_PIN_{6,7,8}` macros, each gated by `defined(FL_IS_ESP_32DEV)`. Classic ESP32 builds skip those three cases; every other family (including ESP32-S2/S3/C/H/P, Teensy, AVR, ARM, RP2040) keeps them. Verified: `bash compile esp32dev --examples AutoResearch --no-filter` now succeeds in 1m35s, where it previously failed with `error: static assertion failed: This pin has been marked as an invalid pin` for pins 6, 7, and 8 in sequence. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #3447. The pin-8 gate in that PR had two bugs:
FL_IS_ESP_32is not a real macro. The actual classic-ESP32 sentinel isFL_IS_ESP_32DEV(seesrc/platforms/esp/is_esp.h:68). The gate never fired — esp32dev compile still hit_ESPPIN<8, 256, false>::validpin() == false.FASTLED_UNUSABLE_PIN_MASKcovers pins{6, 7, 8, 9, 10, 11, 20}(SPI flash SD0/SD1/SD2/SD3/CMD/CLK pads + GPIO20).LegacyClocklessProxyiterates pins 0-8 so the SK6812/WS2812B instantiations on pins 6 and 7 were still failing the static_assert.Fix
Introduce three macros —
AUTORESEARCH_LEGACY_SUPPORTS_PIN_{6,7,8}— each gated bydefined(FL_IS_ESP_32DEV). Classic ESP32 builds skip those three cases; every other family (including ESP32-S2/S3/C/H/P, Teensy, AVR, ARM, RP2040) keeps them.Verification
Previously failed with
error: static assertion failed: This pin has been marked as an invalid pinfor pins 6, 7, and 8 in sequence.🤖 Generated with Claude Code