From cafa78c3f3c70b92abfbc411ed02cade13039f0a Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 10 Dec 2022 19:00:48 +0100 Subject: [PATCH] fixing CI build. really now. -check IDF target after including arduino.h -add missing build flags in [env:esp32s2_saola] --- platformio.ini | 3 ++- wled00/src/dependencies/dmx/SparkFunDMX.cpp | 11 ++++++++--- wled00/wled00.ino.cpp | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 wled00/wled00.ino.cpp diff --git a/platformio.ini b/platformio.ini index e3c63b3b..77b7c38c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -276,7 +276,7 @@ platform = ${common.platform_wled_default} platform_packages = ${common.platform_packages} board_build.ldscript = ${common.ldscript_4m1m} build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266 +build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266 #-DWLED_DISABLE_2D lib_deps = ${esp8266.lib_deps} monitor_filters = esp8266_exception_decoder @@ -377,6 +377,7 @@ board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv board_build.flash_mode = qio upload_speed = 460800 build_unflags = ${common.build_unflags} +build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=S2_saola lib_deps = ${esp32s2.lib_deps} [env:esp32c3] diff --git a/wled00/src/dependencies/dmx/SparkFunDMX.cpp b/wled00/src/dependencies/dmx/SparkFunDMX.cpp index 61b1d7ef..dbc9b159 100644 --- a/wled00/src/dependencies/dmx/SparkFunDMX.cpp +++ b/wled00/src/dependencies/dmx/SparkFunDMX.cpp @@ -14,9 +14,10 @@ Distributed as-is; no warranty is given. ******************************************************************************/ /* ----- LIBRARIES ----- */ -#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S2) +#if defined(ARDUINO_ARCH_ESP32) #include +#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S2) #include "SparkFunDMX.h" #include @@ -36,7 +37,9 @@ static const int txPin = 2; // transmit DMX data over this pin (default i //DMX value array and size. Entry 0 will hold startbyte static uint8_t dmxData[dmxMaxChannel] = { 0 }; static int chanSize = 0; +#if !defined(DMX_SEND_ONLY) static int currentChannel = 0; +#endif // Some new MCUs (-S2, -C3) don't have HardwareSerial(2) #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) @@ -48,8 +51,10 @@ static int currentChannel = 0; static HardwareSerial DMXSerial(2); /* Interrupt Timer for DMX Receive */ +#if !defined(DMX_SEND_ONLY) static hw_timer_t * timer = NULL; static portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED; +#endif static volatile int _interruptCounter = 0; static volatile bool _startCodeDetected = false; @@ -173,5 +178,5 @@ void SparkFunDMX::update() { } // Function to update the DMX bus - -#endif \ No newline at end of file +#endif +#endif diff --git a/wled00/wled00.ino.cpp b/wled00/wled00.ino.cpp new file mode 100644 index 00000000..93f4b5f0 --- /dev/null +++ b/wled00/wled00.ino.cpp @@ -0,0 +1,15 @@ +# 1 "C:\\Users\\Frank\\AppData\\Local\\Temp\\tmpr9svp7zf" +#include +# 1 "D:/ARDUINO_Work/WORK/#ESP32/WLED_soundreactive-GitHub_DEV/WLED-AC_main/WLED_main/wled00/wled00.ino" +# 13 "D:/ARDUINO_Work/WORK/#ESP32/WLED_soundreactive-GitHub_DEV/WLED-AC_main/WLED_main/wled00/wled00.ino" +#include "wled.h" +void setup(); +void loop(); +#line 15 "D:/ARDUINO_Work/WORK/#ESP32/WLED_soundreactive-GitHub_DEV/WLED-AC_main/WLED_main/wled00/wled00.ino" +void setup() { + WLED::instance().setup(); +} + +void loop() { + WLED::instance().loop(); +} \ No newline at end of file