diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 816987093..1e0f7a5a8 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -131,14 +131,14 @@ #define B_32_R1_NEO_3 NeoPixelBrightnessBus #define B_32_R2_NEO_3 NeoPixelBrightnessBus #define B_32_R3_NEO_3 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_R4_NEO_3 NeoPixelBrightnessBus #define B_32_R5_NEO_3 NeoPixelBrightnessBus #define B_32_R6_NEO_3 NeoPixelBrightnessBus #define B_32_R7_NEO_3 NeoPixelBrightnessBus #endif #define B_32_I0_NEO_3 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_I1_NEO_3 NeoPixelBrightnessBus #endif //RGBW @@ -146,14 +146,14 @@ #define B_32_R1_NEO_4 NeoPixelBrightnessBus #define B_32_R2_NEO_4 NeoPixelBrightnessBus #define B_32_R3_NEO_4 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_R4_NEO_4 NeoPixelBrightnessBus #define B_32_R5_NEO_4 NeoPixelBrightnessBus #define B_32_R6_NEO_4 NeoPixelBrightnessBus #define B_32_R7_NEO_4 NeoPixelBrightnessBus #endif #define B_32_I0_NEO_4 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_I1_NEO_4 NeoPixelBrightnessBus #endif //400Kbps @@ -161,14 +161,14 @@ #define B_32_R1_400_3 NeoPixelBrightnessBus #define B_32_R2_400_3 NeoPixelBrightnessBus #define B_32_R3_400_3 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_R4_400_3 NeoPixelBrightnessBus #define B_32_R5_400_3 NeoPixelBrightnessBus #define B_32_R6_400_3 NeoPixelBrightnessBus #define B_32_R7_400_3 NeoPixelBrightnessBus #endif #define B_32_I0_400_3 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_I1_400_3 NeoPixelBrightnessBus #endif //TM1814 (RGBW) @@ -176,14 +176,14 @@ #define B_32_R1_TM1_4 NeoPixelBrightnessBus #define B_32_R2_TM1_4 NeoPixelBrightnessBus #define B_32_R3_TM1_4 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_R4_TM1_4 NeoPixelBrightnessBus #define B_32_R5_TM1_4 NeoPixelBrightnessBus #define B_32_R6_TM1_4 NeoPixelBrightnessBus #define B_32_R7_TM1_4 NeoPixelBrightnessBus #endif #define B_32_I0_TM1_4 NeoPixelBrightnessBus -#ifndef ARDUINO_ARCH_ESP32S2 +#ifndef CONFIG_IDF_TARGET_ESP32S2 #define B_32_I1_TM1_4 NeoPixelBrightnessBus #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) @@ -253,56 +253,56 @@ class PolyBus { case I_32_R1_NEO_3: (static_cast(busPtr))->Begin(); break; case I_32_R2_NEO_3: (static_cast(busPtr))->Begin(); break; case I_32_R3_NEO_3: (static_cast(busPtr))->Begin(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: (static_cast(busPtr))->Begin(); break; case I_32_R5_NEO_3: (static_cast(busPtr))->Begin(); break; case I_32_R6_NEO_3: (static_cast(busPtr))->Begin(); break; case I_32_R7_NEO_3: (static_cast(busPtr))->Begin(); break; #endif case I_32_I0_NEO_3: (static_cast(busPtr))->Begin(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: (static_cast(busPtr))->Begin(); break; #endif case I_32_R0_NEO_4: (static_cast(busPtr))->Begin(); break; case I_32_R1_NEO_4: (static_cast(busPtr))->Begin(); break; case I_32_R2_NEO_4: (static_cast(busPtr))->Begin(); break; case I_32_R3_NEO_4: (static_cast(busPtr))->Begin(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: (static_cast(busPtr))->Begin(); break; case I_32_R5_NEO_4: (static_cast(busPtr))->Begin(); break; case I_32_R6_NEO_4: (static_cast(busPtr))->Begin(); break; case I_32_R7_NEO_4: (static_cast(busPtr))->Begin(); break; #endif case I_32_I0_NEO_4: (static_cast(busPtr))->Begin(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: (static_cast(busPtr))->Begin(); break; #endif case I_32_R0_400_3: (static_cast(busPtr))->Begin(); break; case I_32_R1_400_3: (static_cast(busPtr))->Begin(); break; case I_32_R2_400_3: (static_cast(busPtr))->Begin(); break; case I_32_R3_400_3: (static_cast(busPtr))->Begin(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: (static_cast(busPtr))->Begin(); break; case I_32_R5_400_3: (static_cast(busPtr))->Begin(); break; case I_32_R6_400_3: (static_cast(busPtr))->Begin(); break; case I_32_R7_400_3: (static_cast(busPtr))->Begin(); break; #endif case I_32_I0_400_3: (static_cast(busPtr))->Begin(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: (static_cast(busPtr))->Begin(); break; #endif case I_32_R0_TM1_4: beginTM1814(busPtr); break; case I_32_R1_TM1_4: beginTM1814(busPtr); break; case I_32_R2_TM1_4: beginTM1814(busPtr); break; case I_32_R3_TM1_4: beginTM1814(busPtr); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: beginTM1814(busPtr); break; case I_32_R5_TM1_4: beginTM1814(busPtr); break; case I_32_R6_TM1_4: beginTM1814(busPtr); break; case I_32_R7_TM1_4: beginTM1814(busPtr); break; #endif case I_32_I0_TM1_4: beginTM1814(busPtr); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: beginTM1814(busPtr); break; #endif // ESP32 can (and should, to avoid inadvertantly driving the chip select signal) specify the pins used for SPI, but only in begin() @@ -346,56 +346,56 @@ class PolyBus { case I_32_R1_NEO_3: busPtr = new B_32_R1_NEO_3(len, pins[0]); break; case I_32_R2_NEO_3: busPtr = new B_32_R2_NEO_3(len, pins[0]); break; case I_32_R3_NEO_3: busPtr = new B_32_R3_NEO_3(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: busPtr = new B_32_R4_NEO_3(len, pins[0]); break; case I_32_R5_NEO_3: busPtr = new B_32_R5_NEO_3(len, pins[0]); break; case I_32_R6_NEO_3: busPtr = new B_32_R6_NEO_3(len, pins[0]); break; case I_32_R7_NEO_3: busPtr = new B_32_R7_NEO_3(len, pins[0]); break; #endif case I_32_I0_NEO_3: busPtr = new B_32_I0_NEO_3(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: busPtr = new B_32_I1_NEO_3(len, pins[0]); break; #endif case I_32_R0_NEO_4: busPtr = new B_32_R0_NEO_4(len, pins[0]); break; case I_32_R1_NEO_4: busPtr = new B_32_R1_NEO_4(len, pins[0]); break; case I_32_R2_NEO_4: busPtr = new B_32_R2_NEO_4(len, pins[0]); break; case I_32_R3_NEO_4: busPtr = new B_32_R3_NEO_4(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: busPtr = new B_32_R4_NEO_4(len, pins[0]); break; case I_32_R5_NEO_4: busPtr = new B_32_R5_NEO_4(len, pins[0]); break; case I_32_R6_NEO_4: busPtr = new B_32_R6_NEO_4(len, pins[0]); break; case I_32_R7_NEO_4: busPtr = new B_32_R7_NEO_4(len, pins[0]); break; #endif case I_32_I0_NEO_4: busPtr = new B_32_I0_NEO_4(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: busPtr = new B_32_I1_NEO_4(len, pins[0]); break; #endif case I_32_R0_400_3: busPtr = new B_32_R0_400_3(len, pins[0]); break; case I_32_R1_400_3: busPtr = new B_32_R1_400_3(len, pins[0]); break; case I_32_R2_400_3: busPtr = new B_32_R2_400_3(len, pins[0]); break; case I_32_R3_400_3: busPtr = new B_32_R3_400_3(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: busPtr = new B_32_R4_400_3(len, pins[0]); break; case I_32_R5_400_3: busPtr = new B_32_R5_400_3(len, pins[0]); break; case I_32_R6_400_3: busPtr = new B_32_R6_400_3(len, pins[0]); break; case I_32_R7_400_3: busPtr = new B_32_R7_400_3(len, pins[0]); break; #endif case I_32_I0_400_3: busPtr = new B_32_I0_400_3(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: busPtr = new B_32_I1_400_3(len, pins[0]); break; #endif case I_32_R0_TM1_4: busPtr = new B_32_R0_TM1_4(len, pins[0]); break; case I_32_R1_TM1_4: busPtr = new B_32_R1_TM1_4(len, pins[0]); break; case I_32_R2_TM1_4: busPtr = new B_32_R2_TM1_4(len, pins[0]); break; case I_32_R3_TM1_4: busPtr = new B_32_R3_TM1_4(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: busPtr = new B_32_R4_TM1_4(len, pins[0]); break; case I_32_R5_TM1_4: busPtr = new B_32_R5_TM1_4(len, pins[0]); break; case I_32_R6_TM1_4: busPtr = new B_32_R6_TM1_4(len, pins[0]); break; case I_32_R7_TM1_4: busPtr = new B_32_R7_TM1_4(len, pins[0]); break; #endif case I_32_I0_TM1_4: busPtr = new B_32_I0_TM1_4(len, pins[0]); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: busPtr = new B_32_I1_TM1_4(len, pins[0]); break; #endif #endif @@ -440,56 +440,56 @@ class PolyBus { case I_32_R1_NEO_3: (static_cast(busPtr))->Show(); break; case I_32_R2_NEO_3: (static_cast(busPtr))->Show(); break; case I_32_R3_NEO_3: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: (static_cast(busPtr))->Show(); break; case I_32_R5_NEO_3: (static_cast(busPtr))->Show(); break; case I_32_R6_NEO_3: (static_cast(busPtr))->Show(); break; case I_32_R7_NEO_3: (static_cast(busPtr))->Show(); break; #endif case I_32_I0_NEO_3: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: (static_cast(busPtr))->Show(); break; #endif case I_32_R0_NEO_4: (static_cast(busPtr))->Show(); break; case I_32_R1_NEO_4: (static_cast(busPtr))->Show(); break; case I_32_R2_NEO_4: (static_cast(busPtr))->Show(); break; case I_32_R3_NEO_4: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: (static_cast(busPtr))->Show(); break; case I_32_R5_NEO_4: (static_cast(busPtr))->Show(); break; case I_32_R6_NEO_4: (static_cast(busPtr))->Show(); break; case I_32_R7_NEO_4: (static_cast(busPtr))->Show(); break; #endif case I_32_I0_NEO_4: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: (static_cast(busPtr))->Show(); break; #endif case I_32_R0_400_3: (static_cast(busPtr))->Show(); break; case I_32_R1_400_3: (static_cast(busPtr))->Show(); break; case I_32_R2_400_3: (static_cast(busPtr))->Show(); break; case I_32_R3_400_3: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: (static_cast(busPtr))->Show(); break; case I_32_R5_400_3: (static_cast(busPtr))->Show(); break; case I_32_R6_400_3: (static_cast(busPtr))->Show(); break; case I_32_R7_400_3: (static_cast(busPtr))->Show(); break; #endif case I_32_I0_400_3: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: (static_cast(busPtr))->Show(); break; #endif case I_32_R0_TM1_4: (static_cast(busPtr))->Show(); break; case I_32_R1_TM1_4: (static_cast(busPtr))->Show(); break; case I_32_R2_TM1_4: (static_cast(busPtr))->Show(); break; case I_32_R3_TM1_4: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: (static_cast(busPtr))->Show(); break; case I_32_R5_TM1_4: (static_cast(busPtr))->Show(); break; case I_32_R6_TM1_4: (static_cast(busPtr))->Show(); break; case I_32_R7_TM1_4: (static_cast(busPtr))->Show(); break; #endif case I_32_I0_TM1_4: (static_cast(busPtr))->Show(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: (static_cast(busPtr))->Show(); break; #endif #endif @@ -531,56 +531,56 @@ class PolyBus { case I_32_R1_NEO_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R2_NEO_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R3_NEO_3: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R5_NEO_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R6_NEO_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R7_NEO_3: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_I0_NEO_3: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_R0_NEO_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R1_NEO_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R2_NEO_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R3_NEO_4: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R5_NEO_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R6_NEO_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R7_NEO_4: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_I0_NEO_4: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_R0_400_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R1_400_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R2_400_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R3_400_3: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R5_400_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R6_400_3: return (static_cast(busPtr))->CanShow(); break; case I_32_R7_400_3: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_I0_400_3: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_R0_TM1_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R1_TM1_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R2_TM1_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R3_TM1_4: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R5_TM1_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R6_TM1_4: return (static_cast(busPtr))->CanShow(); break; case I_32_R7_TM1_4: return (static_cast(busPtr))->CanShow(); break; #endif case I_32_I0_TM1_4: return (static_cast(busPtr))->CanShow(); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: return (static_cast(busPtr))->CanShow(); break; #endif #endif @@ -641,56 +641,56 @@ class PolyBus { case I_32_R1_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R2_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R3_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R5_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R6_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R7_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; #endif case I_32_I0_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; #endif case I_32_R0_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R1_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R2_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R3_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R5_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R6_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R7_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; #endif case I_32_I0_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; #endif case I_32_R0_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R1_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R2_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R3_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R5_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R6_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; case I_32_R7_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; #endif case I_32_I0_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: (static_cast(busPtr))->SetPixelColor(pix, RgbColor(col.R,col.G,col.B)); break; #endif case I_32_R0_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R1_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R2_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R3_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R5_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R6_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; case I_32_R7_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; #endif case I_32_I0_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: (static_cast(busPtr))->SetPixelColor(pix, col); break; #endif #endif @@ -732,56 +732,56 @@ class PolyBus { case I_32_R1_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R2_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R3_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R5_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R6_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R7_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_I0_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_R0_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R1_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R2_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R3_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R5_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R6_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R7_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_I0_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_R0_400_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R1_400_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R2_400_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R3_400_3: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R5_400_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R6_400_3: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R7_400_3: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_I0_400_3: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_R0_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R1_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R2_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R3_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R5_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R6_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; case I_32_R7_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; #endif case I_32_I0_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: (static_cast(busPtr))->SetBrightness(b); break; #endif #endif @@ -824,56 +824,56 @@ class PolyBus { case I_32_R1_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R2_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R3_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R5_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R6_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R7_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_I0_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_R0_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R1_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R2_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R3_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R5_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R6_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R7_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_I0_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_R0_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R1_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R2_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R3_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R5_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R6_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R7_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_I0_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_R0_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R1_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R2_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R3_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R5_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R6_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; case I_32_R7_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif case I_32_I0_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: col = (static_cast(busPtr))->GetPixelColor(pix); break; #endif #endif @@ -929,56 +929,56 @@ class PolyBus { case I_32_R1_NEO_3: delete (static_cast(busPtr)); break; case I_32_R2_NEO_3: delete (static_cast(busPtr)); break; case I_32_R3_NEO_3: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_3: delete (static_cast(busPtr)); break; case I_32_R5_NEO_3: delete (static_cast(busPtr)); break; case I_32_R6_NEO_3: delete (static_cast(busPtr)); break; case I_32_R7_NEO_3: delete (static_cast(busPtr)); break; #endif case I_32_I0_NEO_3: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_3: delete (static_cast(busPtr)); break; #endif case I_32_R0_NEO_4: delete (static_cast(busPtr)); break; case I_32_R1_NEO_4: delete (static_cast(busPtr)); break; case I_32_R2_NEO_4: delete (static_cast(busPtr)); break; case I_32_R3_NEO_4: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_NEO_4: delete (static_cast(busPtr)); break; case I_32_R5_NEO_4: delete (static_cast(busPtr)); break; case I_32_R6_NEO_4: delete (static_cast(busPtr)); break; case I_32_R7_NEO_4: delete (static_cast(busPtr)); break; #endif case I_32_I0_NEO_4: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_NEO_4: delete (static_cast(busPtr)); break; #endif case I_32_R0_400_3: delete (static_cast(busPtr)); break; case I_32_R1_400_3: delete (static_cast(busPtr)); break; case I_32_R2_400_3: delete (static_cast(busPtr)); break; case I_32_R3_400_3: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_400_3: delete (static_cast(busPtr)); break; case I_32_R5_400_3: delete (static_cast(busPtr)); break; case I_32_R6_400_3: delete (static_cast(busPtr)); break; case I_32_R7_400_3: delete (static_cast(busPtr)); break; #endif case I_32_I0_400_3: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_400_3: delete (static_cast(busPtr)); break; #endif case I_32_R0_TM1_4: delete (static_cast(busPtr)); break; case I_32_R1_TM1_4: delete (static_cast(busPtr)); break; case I_32_R2_TM1_4: delete (static_cast(busPtr)); break; case I_32_R3_TM1_4: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_R4_TM1_4: delete (static_cast(busPtr)); break; case I_32_R5_TM1_4: delete (static_cast(busPtr)); break; case I_32_R6_TM1_4: delete (static_cast(busPtr)); break; case I_32_R7_TM1_4: delete (static_cast(busPtr)); break; #endif case I_32_I0_TM1_4: delete (static_cast(busPtr)); break; - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 case I_32_I1_TM1_4: delete (static_cast(busPtr)); break; #endif #endif @@ -1035,7 +1035,7 @@ class PolyBus { } #else //ESP32 uint8_t offset = num; //RMT bus # == bus index in BusManager - #ifndef ARDUINO_ARCH_ESP32S2 + #ifndef CONFIG_IDF_TARGET_ESP32S2 if (offset > 9) return I_NONE; #else if (offset > 4) return I_NONE; diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index e675bd5ee..6e5a8d7a7 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -493,11 +493,9 @@ void serializeConfig() { hw_btn_ins_0_macros.add(macroLongPress); hw_btn_ins_0_macros.add(macroDoublePress); - #ifndef WLED_DISABLE_INFRARED JsonObject hw_ir = hw.createNestedObject("ir"); hw_ir["pin"] = irPin; hw_ir["type"] = irEnabled; // the byte 'irEnabled' does contain the IR-Remote Type ( 0=disabled ) - #endif JsonObject hw_relay = hw.createNestedObject(F("relay")); hw_relay["pin"] = rlyPin; diff --git a/wled00/json.cpp b/wled00/json.cpp index 7ab3b321d..e88f2b212 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -615,6 +615,13 @@ void serializeInfo(JsonObject root) root[F("brand")] = "WLED"; root[F("product")] = F("FOSS"); root["mac"] = escapedMac; + char s[16] = ""; + if (Network.isConnected()) + { + IPAddress localIP = Network.localIP(); + sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]); + } + root["ip"] = s; } void setPaletteColors(JsonArray json, CRGBPalette16 palette) diff --git a/wled00/wled.h b/wled00/wled.h index 555506914..509f22ff5 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2104251 +#define VERSION 2104261 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG @@ -204,7 +204,7 @@ WLED_GLOBAL bool rlyMde _INIT(true); WLED_GLOBAL bool rlyMde _INIT(RLYMDE); #endif #ifndef IRPIN -WLED_GLOBAL int8_t irPin _INIT(4); +WLED_GLOBAL int8_t irPin _INIT(-1); #else WLED_GLOBAL int8_t irPin _INIT(IRPIN); #endif