Skip to content

Commit

Permalink
Merge branch 'ay-current' into pr/219
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrster committed Jul 23, 2022
2 parents 479172c + cd0a2c4 commit a250290
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 165 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.13.2-a0",
"version": "0.13.2-a2-ay",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
235 changes: 96 additions & 139 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
# Please uncomment one of the lines below to select your board(s)
# ------------------------------------------------------------------------------

# Travis CI binaries (use `platformio_override.ini` when building for your own board; see `platformio_override.ini.sample` for an example)
# Travis CI binaries (comment this out with a ';' when building for your own board)
; default_envs = travis_esp8266, travis_esp32

# Release binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3

# WLED sound-reactive binaries
; default_envs = soundReactive_lolin_d32
default_envs = soundReactive_esp32dev, soundReactive_esp32_eth
; default_envs = soundReactive_esp32dev, soundReactive_esp32_eth
default_envs = soundReactive_wled-06

# Build everything
; default_envs = esp32dev, esp8285_4CH_MagicHome, codm-controller-0.6-rev2, codm-controller-0.6, esp32s2_saola, d1_mini_5CH_Shojo_PCB, d1_mini, sp501e, travis_esp8266, travis_esp32, nodemcuv2, esp32_eth, anavi_miracle_controller, esp07, esp01_1m_full, m5atom, h803wf, d1_mini_ota, heltec_wifi_kit_8, esp8285_H801, d1_mini_debug, wemos_shield_esp32, elekstube_ips

# Single binaries (uncomment your board)
; default_envs = elekstube_ips
Expand Down Expand Up @@ -111,13 +110,9 @@ build_flags =
-D NDEBUG
#build_flags for the IRremoteESP8266 library (enabled decoders have to appear here)
-D _IR_ENABLE_DEFAULT_=false
-D DECODE_HASH=true
-D DECODE_NEC=true
-D DECODE_SONY=true
-D DECODE_SAMSUNG=true
-D DECODE_LG=true
; -DWLED_USE_MY_CONFIG
; -D USERMOD_SENSORSTOMQTT
-D WLED_VERSION=0.13.0-b4-ay

build_unflags =

Expand Down Expand Up @@ -236,8 +231,6 @@ build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S2
-DCONFIG_IDF_TARGET_ESP32S2
-D CONFIG_ASYNC_TCP_USE_WDT=0
-DCO

lib_deps =
${env.lib_deps}
Expand Down Expand Up @@ -331,8 +324,7 @@ board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
upload_speed = 921600
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
Expand Down Expand Up @@ -450,7 +442,16 @@ platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
build_flags = ${common.build_flags_esp32}
-D WLED_RELEASE_NAME=ESP32_AY
-D WLED_DISABLE_INFRARED
-D WLED_DISABLE_MQTT
-D WLED_DISABLE_ALEXA
-D WLED_DISABLE_BLYNK
-D WLED_DISABLE_CRONIXIE
-D WLED_DISABLE_HUESYNC
-D WLED_DISABLE_BROWNOUT_DET
-D WLED_VERSION=0.13.0-b4-ay
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
Expand All @@ -461,76 +462,67 @@ platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
lib_deps = ${esp32.lib_deps}
board_build.partitions = ${esp32.default_partitions}

[env:soundReactive_lolin_d32]
board = lolin_d32
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_MQTT
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}

[env:lolin_d32_pro]
board = lolin_d32_pro
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
[env:soundReactive_wled]
platform = [email protected]
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.f_cpu = 240000000L
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = tools/SoundReactive_ESP32_16MB.csv

[env:soundReactive_m5atom]
board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 1500000
monitor_speed = 115200
board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32}
-D WLED_RELEASE_NAME=ESP32
-D WLED_DISABLE_MQTT
-D WLED_DISABLE_LOXONE
-D LEDPIN=27
-D BTNPIN=39
-D DMENABLED=5
-D I2S_SDPIN=26
-D I2S_WSPIN=32
-D I2S_CKPIN=-1
build_flags = ${common.build_flags_esp32}
-D WLED_RELEASE_NAME=ESP32_AY
-D IRPIN=4
-D WLED_DISABLE_ALEXA
-D WLED_DISABLE_BLYNK
-D WLED_DISABLE_CRONIXIE
-D WLED_DISABLE_HUESYNC
-D WLED_DISABLE_BROWNOUT_DET
-D _IR_ENABLE_DEFAULT_=true
-D DECODE_HASH=true
-D DECODE_NEC=true
-D DECODE_SONY=true
-D DECODE_SAMSUNG=true
-D DECODE_LG=true
-D WLED_USE_MY_CONFIG=true
-D CONFIG_ASYNC_TCP_RUNNING_CORE=1
-D CONFIG_ASYNC_TCP_USE_WDT=0
-D CONFIG_ASYNC_TCP_TASK_PRIORITY=3
; -D WLED_DISABLE_OTA=true
; -D DEBUG=true
; -D WLED_DEBUG=true
; -D CORE_DEBUG_LEVEL=5
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}

[env:soundReactive_m5stamp-pico]
[env:soundReactive_wled-06]
extends = env:soundReactive_wled
board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 1500000
monitor_speed = 115200
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32}
-D WLED_RELEASE_NAME=ESP32
-D WLED_DISABLE_MQTT
-D WLED_DISABLE_LOXONE
-D LEDPIN=27
-D BTNPIN=39
-D DMENABLED=5
-D I2S_SDPIN=32
-D I2S_WSPIN=33
-D I2S_CKPIN=-1
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
; monitor_port = /dev/cu.usbserial-01F95906
; upload_port = /dev/cu.usbserial-01F95906
upload_port = 10.9.9.220

[env:soundReactive_wled-05]
extends = env:soundReactive_wled
board = wemos_d1_mini32
build_flags = ${common.build_flags_esp32}
-D WLED_RELEASE_NAME=ESP32_AY
-D WLED_DISABLE_INFRARED
-D WLED_DISABLE_ALEXA
-D WLED_DISABLE_BLYNK
-D WLED_DISABLE_CRONIXIE
-D WLED_DISABLE_HUESYNC
-D WLED_DISABLE_BROWNOUT_DET
-D WLED_USE_MY_CONFIG=true
-D CONFIG_ASYNC_TCP_RUNNING_CORE=1
-D CONFIG_ASYNC_TCP_USE_WDT=0
-D CONFIG_ASYNC_TCP_TASK_PRIORITY=3
; -D WLED_DISABLE_OTA=true
; -D DEBUG=true
; -D WLED_DEBUG=true
; -D CORE_DEBUG_LEVEL=5
upload_port = /dev/cu.usbserial-0205C866
; upload_port = 10.9.9.124

# ------------------------------------------------------------------------------
# custom board configurations
Expand All @@ -539,7 +531,7 @@ board_build.partitions = ${esp32.default_partitions}
[env:wemos_shield_esp32]
board = esp32dev
platform = [email protected]
upload_speed = 921600
upload_speed = 460800
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32}
-D LEDPIN=16
Expand All @@ -552,9 +544,7 @@ build_flags = ${common.build_flags_esp32}
-D TEMPERATURE_PIN=23
lib_deps = ${esp32.lib_deps}
OneWire@~2.3.5
olikraus/U8g2 @ ^2.28.8
board_build.partitions = ${esp32.default_partitions}
; board_build.partitions = tools/SoundReactive_ESP32_16MB.csv ; ESP32 16MB
U8g2@~2.28.11

[env:m5atom]
board = esp32dev
Expand All @@ -571,36 +561,6 @@ board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=1
lib_deps = ${esp8266.lib_deps}

[env:sp511e]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=2 -D IRPIN=5 -D WLED_MAX_BUTTONS=3
lib_deps = ${esp8266.lib_deps}

[env:athom7w]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D WLED_MAX_CCT_BLEND=0 -D BTNPIN=-1 -D IRPIN=-1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}

[env:athom15w]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D WLED_USE_IC_CCT -D BTNPIN=-1 -D IRPIN=-1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}

[env:MY9291]
board = esp01_1m
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP01 -D WLED_DISABLE_OTA -D USERMOD_MY9291
lib_deps = ${esp8266.lib_deps}

# ------------------------------------------------------------------------------
# travis test board configurations
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -643,32 +603,29 @@ lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# EleksTube-IPS
# ------------------------------------------------------------------------------
[env:elekstube_ips]
board = esp32dev
platform = [email protected]
upload_speed = 921600
build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_BROWNOUT_DET -D WLED_DISABLE_INFRARED
-D USERMOD_RTC
-D USERMOD_ELEKSTUBE_IPS
-D LEDPIN=12
-D RLYPIN=27
-D BTNPIN=34
-D WLED_DISABLE_BLYNK
-D DEFAULT_LED_COUNT=6
# Display config
-D ST7789_DRIVER
-D TFT_WIDTH=135
-D TFT_HEIGHT=240
-D CGRAM_OFFSET
-D TFT_SDA_READ
-D TFT_MOSI=23
-D TFT_SCLK=18
-D TFT_DC=25
-D TFT_RST=26
-D SPI_FREQUENCY=40000000
-D USER_SETUP_LOADED
monitor_filters = esp32_exception_decoder
lib_deps =
${esp32.lib_deps}
TFT_eSPI @ ^2.3.70
board_build.partitions = ${esp32.default_partitions}
; [env:elekstube_ips]
; board = esp32dev
; platform = [email protected]
; upload_speed = 921600
; build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_BROWNOUT_DET -D WLED_DISABLE_INFRARED
; -D USERMOD_RTC
; -D USERMOD_ELEKSTUBE_IPS
; -D LEDPIN=12
; -D RLYPIN=27
; -D BTNPIN=34
; -D WLED_DISABLE_INFRARED
; -D DEFAULT_LED_COUNT=6
; # Display config
; -D ST7789_DRIVER
; -D TFT_WIDTH=135
; -D TFT_HEIGHT=240
; -D CGRAM_OFFSET
; -D TFT_SDA_READ
; -D TFT_MOSI=23
; -D TFT_SCLK=18
; -D TFT_DC=25
; -D TFT_RST=26
; -D SPI_FREQUENCY=40000000
; -D USER_SETUP_LOADED
; monitor_filters = esp32_exception_decoder
; lib_deps = ${esp32.lib_deps} TFT_eSPI
28 changes: 25 additions & 3 deletions wled00/ir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,13 +705,29 @@ void decodeIRJson(uint32_t code)
releaseJSONBufferLock();
}

void initIR()
void ir_loop(void* _)
{
DEBUG_PRINT(F("IR running at core: #"));
DEBUG_PRINTLN(xPortGetCoreID());

if (irEnabled > 0)
{
irrecv = new IRrecv(irPin);
irrecv->enableIRIn();
}

while (1) {
handleIR();
delay(80);
}
}

void initIR()
{
strlcpy(mqttIrTopic, mqttDeviceTopic, 33);
strcat_P(mqttIrTopic, PSTR("/ir"));

xTaskCreatePinnedToCore(ir_loop, "IR", 4000, NULL, 3, &IR_Task, 0);
}

void handleIR()
Expand All @@ -730,8 +746,14 @@ void handleIR()
{
if (results.value != 0) // only print results if anything is received ( != 0 )
{
if (!pinManager.isPinAllocated(1) || pinManager.getPinOwner(1) == PinOwner::DebugOut) //GPIO 1 - Serial TX pin
Serial.printf_P(PSTR("IR recv: 0x%lX\n"), (unsigned long)results.value);
lastIrValue = (uint32_t)results.value;

// Serial.print("IR recv\r\n0x");
// // Serial.println((uint32_t)results.value, HEX);
// Serial.println(lastIrMessage);
// Serial.println();

doPublishMqttIr = true;
}
decodeIR(results.value);
irrecv->resume();
Expand Down
3 changes: 3 additions & 0 deletions wled00/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
if (!presetId) unloadPlaylist(); //stop playlist if preset changed manually
if (ps >= presetCycMin && ps <= presetCycMax) presetCycCurr = ps;
applyPreset(ps, callMode);

doPublishMqtt = true;
return stateResponse;
}

Expand All @@ -440,6 +442,7 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)

stateUpdated(callMode);

doPublishMqtt = true;
return stateResponse;
}

Expand Down
Loading

0 comments on commit a250290

Please sign in to comment.