From cffee7bfa7902f417fa34a6b439fd77c92bd9800 Mon Sep 17 00:00:00 2001 From: Def3nder Date: Fri, 28 Feb 2020 16:27:18 +0100 Subject: [PATCH 1/2] Fix 24-key IR remote (#738) --- wled00/wled20_ir.ino | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/wled00/wled20_ir.ino b/wled00/wled20_ir.ino index 617518c31..c65a4c58e 100644 --- a/wled00/wled20_ir.ino +++ b/wled00/wled20_ir.ino @@ -90,8 +90,8 @@ void decodeIR(uint32_t code) // sets bright plain white default: return; } - colorUpdated(NOTIFIER_CALL_MODE_BUTTON); //for notifier, IR is considered a button input } + colorUpdated(NOTIFIER_CALL_MODE_BUTTON); //for notifier, IR is considered a button input //code <= 0xF70000 also invalid } @@ -356,25 +356,25 @@ void decodeIR6(uint32_t code) /* next palette */ relativeChange(&effectPalette, 1); switch(lastIR6ColourIdx) { - case 0: colorFromUint32(COLOR_RED); break; - case 1: colorFromUint32(COLOR_REDDISH); break; - case 2:colorFromUint32(COLOR_ORANGE); break; - case 3:colorFromUint32(COLOR_YELLOWISH); break; - case 4:colorFromUint32(COLOR_GREEN); break; - case 5:colorFromUint32(COLOR_GREENISH); break; - case 6:colorFromUint32(COLOR_TURQUOISE); break; - case 7: colorFromUint32(COLOR_CYAN); break; - case 8:colorFromUint32(COLOR_BLUE); break; - case 9:colorFromUint32(COLOR_DEEPBLUE); break; - case 10:colorFromUint32(COLOR_PURPLE); break; - case 11:colorFromUint32(COLOR_PINK); break; - case 12:colorFromUint32(COLOR_WHITE); break; - default:break; + case 0: colorFromUint32(COLOR_RED); break; + case 1: colorFromUint32(COLOR_REDDISH); break; + case 2: colorFromUint32(COLOR_ORANGE); break; + case 3: colorFromUint32(COLOR_YELLOWISH); break; + case 4: colorFromUint32(COLOR_GREEN); break; + case 5: colorFromUint32(COLOR_GREENISH); break; + case 6: colorFromUint32(COLOR_TURQUOISE); break; + case 7: colorFromUint32(COLOR_CYAN); break; + case 8: colorFromUint32(COLOR_BLUE); break; + case 9: colorFromUint32(COLOR_DEEPBLUE); break; + case 10:colorFromUint32(COLOR_PURPLE); break; + case 11:colorFromUint32(COLOR_PINK); break; + case 12:colorFromUint32(COLOR_WHITE); break; + default: break; } lastIR6ColourIdx++; if(lastIR6ColourIdx > 12) lastIR6ColourIdx = 0; break; - case IR6_MUTE: effectCurrent = 0; effectPalette = 0; colorFromUint32(COLOR_WHITE); bri=255; break; + case IR6_MUTE: effectCurrent = 0; effectPalette = 0; colorFromUint32(COLOR_WHITE); bri=255; break; } lastValidCode = code; } From 480e7f5b5463a8c34f169e01791d0005d70c5125 Mon Sep 17 00:00:00 2001 From: Def3nder Date: Fri, 28 Feb 2020 18:53:38 +0100 Subject: [PATCH 2/2] Add all release environments to platformio.ini (#736) --- platformio.ini | 37 +++++++++++++++++++++++++++++---- platformio_override.ini.example | 19 ++++++++++++++++- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index 5549cc179..9128d50e2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,7 +21,7 @@ default_envs = nodemcuv2 ; default_envs = esp8285_5CH_H801 # Release binaries follow -; default_envs = nodemcuv2, esp01, esp01_1m, esp32dev +; default_envs = nodemcuv2, esp01, esp01_1m, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4 [common] # ------------------------------------------------------------------------------ @@ -48,7 +48,7 @@ arduino_core_2_5_1 = espressif8266@2.1.1 arduino_core_2_5_2 = espressif8266@2.2.3 arduino_core_2_6_1 = espressif8266@2.3.0 arduino_core_2_6_2 = espressif8266@2.3.1 -arduino_core_2_6_3 = espressif8266@2.3.2 +arduino_core_2_6_3 = espressif8266@2.3.3 # Development platforms arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop @@ -61,8 +61,9 @@ platform_latest = ${common.arduino_core_2_6_3} # FLAGS: DEBUG # # ------------------------------------------------------------------------------ -debug_flags = -D DEBUG=1 -D WLED_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM +debug_flags = -D DEBUG=1 -D WLED_DEBUG -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM #if needed (for memleaks etc) also add; -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" +#-DDEBUG_ESP_CORE is not working right now # ------------------------------------------------------------------------------ # FLAGS: ldscript @@ -88,7 +89,7 @@ debug_flags = -D DEBUG=1 -D WLED_DEBUG -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG # TLS_RSA_WITH_AES_256_CBC_SHA / AES256-SHA # This reduces the OTA size with ~45KB, so it's especially useful on low memory boards (512k/1m). # ------------------------------------------------------------------------------ -build_flags = -g -w -DMQTT_MAX_PACKET_SIZE=1024 -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH +build_flags = -g -w -DMQTT_MAX_PACKET_SIZE=1024 -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL -DBEARSSL_SSL_BASIC build_flags_esp8266 = ${common.build_flags} -DESP8266 build_flags_esp32 = ${common.build_flags} -DARDUINO_ARCH_ESP32 @@ -207,3 +208,31 @@ build_type = debug platform = ${common.platform_latest} board_build.ldscript = ${common.ldscript_4m1m} build_flags = ${common.build_flags_esp8266} ${common.debug_flags} + +# ------------------------------------------------------------------------------ +# custom board configurations +# ------------------------------------------------------------------------------ + +[env:custom_LEDPIN_4] +board = d1_mini +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_4m1m} +build_flags = ${common.build_flags_esp8266} -D LEDPIN=4 -D IRPIN=5 + +[env:custom_LEDPIN_16] +board = d1_mini +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_4m1m} +build_flags = ${common.build_flags_esp8266} -D LEDPIN=16 + +[env:custom_APA102] +board = d1_mini +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_4m1m} +build_flags = ${common.build_flags_esp8266} -D USE_APA102 + +[env:custom_WS2801] +board = d1_mini +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_4m1m} +build_flags = ${common.build_flags_esp8266} -D USE_WS2801 diff --git a/platformio_override.ini.example b/platformio_override.ini.example index 09c301728..46119f159 100644 --- a/platformio_override.ini.example +++ b/platformio_override.ini.example @@ -14,4 +14,21 @@ build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_BLYNK -D WLED_DISABLE_CRONIXIE -D WLED_DISABLE_HUESYNC - -D WLED_DISABLE_INFRARED \ No newline at end of file + -D WLED_DISABLE_INFRARED +; PIN defines - uncomment and change, if needed: +; -D LEDPIN=2 +; -D BTNPIN=0 +; -D IR_PIN=4 +; -D RLYPIN=12 +; -D RLYMDE=1 +; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support +; -D USE_APA102 +; -D USE_WS2801 +; -D USE_LPD8806 +; to drive analog LED strips (aka 5050), uncomment the following +; PWM pins 5,12,13,15 are used with Magic Home LED Controller (default) +; -D WLED_USE_ANALOG_LEDS +; for the H801 controler (PINs 15,13,12,14 (W2 = 04)) uncomment this +; -D WLED_USE_H801 +; and to enable channel 5 for RGBW-CT led strips this +; -D WLED_USE_5CH_LEDS