From 75b19fd09da93733868b57174a169b0ae4f4fd9f Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Sun, 8 Sep 2019 20:56:31 +0200 Subject: [PATCH] Version 2.2.5 Bugfixes --- .gitignore | 5 ++++- Arduino/McLighting/McLighting.ino | 2 +- Arduino/McLighting/definitions.h | 1 + Arduino/McLighting/request_handlers.h | 6 +++--- Arduino/McLighting/version.h | 2 +- Arduino/McLighting/version_info.ino | 8 +++++++- platformio.ini | 6 ++++-- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index f88ff70..c62e74e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ lib/readme.txt .clang_complete .gcc-flags.json -.vscode/* \ No newline at end of file +.vscode/* +.pio/* + +*.bin diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 21f5db6..494ac61 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -167,7 +167,7 @@ WS2812FX * strip = NULL; void DMA_Show(void) { if(dma->IsReadyToUpdate()) { memcpy(dma->getPixels(), strip->getPixels(), dma->getPixelsSize()); - dma->Update(); + dma->Update(false); } } #endif diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index 5043437..a764155 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -1,4 +1,5 @@ #define USE_WS2812FX_DMA 0 // 0 = Used PIN is ignored & set to RX/GPIO3; 1 = Used PIN is ignored & set to D4/GPIO2; 2 = Uses PIN is ignored & set to TX/GPIO1; Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX + // or comment it out #if defined(USE_WS2812FX_DMA) #define MAXLEDS 384 // due to memory limit of esp8266 at the moment only 384 leds are supported in DMA Mode. More can crash if mqtt is used. #else diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index f272747..6c2b3a9 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -59,7 +59,7 @@ void convertColors() { void getArgs() { - if (mode == SET_ALL || mode == SET_MODE || mode == SET_COLOR) { + if (mode == SET_ALL || mode == SET_COLOR) { if (server.arg("rgb") != "") { uint32_t rgb = (uint32_t) strtoul(server.arg("rgb").c_str(), NULL, 16); main_color.white = ((rgb >> 24) & 0xFF); @@ -134,7 +134,7 @@ void getArgs() { xtra_color.white = constrain(xtra_color.white, 0, 255); convertColors(); } - if (mode == SET_ALL || mode == SET_MODE || mode == SET_SPEED || mode == TV) { + if (mode == SET_ALL || mode == SET_SPEED || mode == TV) { if ((server.arg("s") != "") && (server.arg("s").toInt() >= 0) && (server.arg("s").toInt() <= 255)) { ws2812fx_speed = constrain(server.arg("s").toInt(), 0, 255); } @@ -144,7 +144,7 @@ void getArgs() { ws2812fx_mode = constrain(server.arg("m").toInt(), 0, strip->getModeCount() - 1); } } - if (mode == SET_ALL || mode == SET_MODE || mode == SET_BRIGHTNESS || mode == AUTO || mode == TV || mode == E131) { + if (mode == SET_ALL || mode == SET_BRIGHTNESS || mode == AUTO || mode == TV || mode == E131) { if ((server.arg("c") != "") && (server.arg("c").toInt() >= 0) && (server.arg("c").toInt() <= 100)) { brightness = constrain((int) server.arg("c").toInt() * 2.55, 0, 255); } else if ((server.arg("p") != "") && (server.arg("p").toInt() >= 0) && (server.arg("p").toInt() <= 255)) { diff --git a/Arduino/McLighting/version.h b/Arduino/McLighting/version.h index b131c81..b8113aa 100644 --- a/Arduino/McLighting/version.h +++ b/Arduino/McLighting/version.h @@ -1 +1 @@ -#define SKETCH_VERSION "2.2.4.RU1.rgbw.3c" +#define SKETCH_VERSION "2.2.5.RU1.rgbw.3c" diff --git a/Arduino/McLighting/version_info.ino b/Arduino/McLighting/version_info.ino index 213d2dd..ea8e7fa 100644 --- a/Arduino/McLighting/version_info.ino +++ b/Arduino/McLighting/version_info.ino @@ -150,6 +150,12 @@ * 26 Mar 2019 * Bugfixes * - * 19 May 2010 + * 19 May 2019 * Bugfixes regarding MQTT Hostname + * + * 08 September 2019 + * Version Bump to 2.2.5 rgbw 3colors + * adressed issue: #27 + * adressed issue: #28 (see new REST-API documentation) + * */ diff --git a/platformio.ini b/platformio.ini index 61482b7..5803450 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,7 +11,7 @@ [platformio] src_dir = ./Arduino/McLighting/ data_dir = ./Arduino/McLighting/data/ -env_default = nodemcuv2 +default_envs = nodemcuv2 description = The ESP8266 based multi-client lighting gadget [common] @@ -32,11 +32,13 @@ arduino_core_2_4_0 = espressif8266@1.6.0 arduino_core_2_4_1 = espressif8266@1.7.3 arduino_core_2_4_2 = espressif8266@1.8.0 arduino_core_2_5_0 = espressif8266@2.0.4 +arduino_core_2_5_1 = espressif8266@2.1.1 +arduino_core_2_5_2 = espressif8266@2.2.0 arduino_core_stage = https://github.com/platformio/platform-espressif8266.git#feature/stage framework = arduino ;platform = ${common.arduino_core_2_4_2} -platform = ${common.arduino_core_2_5_0} +platform = ${common.arduino_core_2_5_2} build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH -DMQTT_MAX_PACKET_SIZE=512 ; PubSubClient Specific flags