File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ constexpr size_t FIXED_PALETTE_COUNT = DYNAMIC_PALETTE_COUNT + FASTLED_PALETTE_C
6666 #endif
6767
6868 // define -> constexpr to avoid preprocessor errors and enum arithmetic warnings from newer compilers
69+ #ifdef WLED_MAX_ANALOG_CHANNELS
70+ #undef WLED_MAX_ANALOG_CHANNELS // avoid clash between macro name and constexpr constant
71+ #endif
6972 constexpr size_t WLED_MAX_ANALOG_CHANNELS = static_cast <size_t >(LEDC_CHANNEL_MAX) * static_cast <size_t >(LEDC_SPEED_MODE_MAX);
7073
7174 #if defined(CONFIG_IDF_TARGET_ESP32C3) // 2 RMT, 6 LEDC, only has 1 I2S but NPB does not support it ATM
@@ -103,7 +106,8 @@ constexpr size_t FIXED_PALETTE_COUNT = DYNAMIC_PALETTE_COUNT + FASTLED_PALETTE_C
103106#ifdef WLED_MAX_BUSSES
104107 #undef WLED_MAX_BUSSES
105108#endif
106- #define WLED_MAX_BUSSES (WLED_MAX_DIGITAL_CHANNELS+WLED_MAX_ANALOG_CHANNELS)
109+ // define -> constexpr to align with defintion of WLED_MAX_ANALOG_CHANNELS
110+ constexpr size_t WLED_MAX_BUSSES = WLED_MAX_DIGITAL_CHANNELS + WLED_MAX_ANALOG_CHANNELS;
107111static_assert (WLED_MAX_BUSSES <= 32 , " WLED_MAX_BUSSES exceeds hard limit" );
108112
109113// Maximum number of pins per output. 5 for RGBCCT analog LEDs.
You can’t perform that action at this time.
0 commit comments