From 1f0087fec856708075e9fe087d92b4d0dc8001d6 Mon Sep 17 00:00:00 2001 From: Debashish Sahu <debashish.sahu@gmail.com> Date: Tue, 5 Mar 2019 11:42:01 -0500 Subject: [PATCH] review update - saveWS2812FXStripSettings.once(3, writeStripConfigFS); is called in every initStrip(), so no need for writeStripConfigFS() call. - modify "/pixels" REST API to "/pixelconf" API --- Arduino/McLighting/McLighting.ino | 5 ++--- Arduino/McLighting/definitions.h | 3 ++- Arduino/McLighting/version_info.ino | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 5ff2599..98efe7b 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -265,7 +265,7 @@ void initStrip(uint16_t stripSize = WS2812FXStripSettings.stripSize, neoPixelTyp //strip->setMode(ws2812fx_mode); strip->setColor(main_color.red, main_color.green, main_color.blue); #ifdef CUSTOM_WS2812FX_ANIMATIONS - strip->setCustomMode(myCustomEffect); + strip->setCustomMode(F("Fire 2012"), myCustomEffect); #endif strip->start(); if(mode != HOLD) mode = SET_MODE; @@ -771,7 +771,7 @@ void setup() { getStatusJSON(); }); - server.on("/pixels", []() { + server.on("/pixelconf", []() { bool updateStrip = false; if(server.hasArg("ct")){ @@ -842,7 +842,6 @@ void setup() { ws2812fx_mode = strip->getMode(); if(strip->isRunning()) strip->stop(); initStrip(); - writeStripConfigFS(); strip->setMode(ws2812fx_mode); strip->trigger(); } diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index cc46797..9c17969 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -19,7 +19,8 @@ //#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth #define ENABLE_LEGACY_ANIMATIONS // Dont disbale this for now #define ENABLE_E131 // E1.31 implementation -//#define USE_HTML_MIN_GZ //uncomment for using index.htm & edit.htm from PROGMEM instead of SPIFFs +//#define USE_HTML_MIN_GZ //uncomment for using index.htm & edit.htm from PROGMEM instead of SPIFFs +//#define CUSTOM_WS2812FX_ANIMATIONS //uncomment and put animations in "custom_ws2812fx_animations.h" #ifdef ENABLE_E131 #define START_UNIVERSE 1 // First DMX Universe to listen for diff --git a/Arduino/McLighting/version_info.ino b/Arduino/McLighting/version_info.ino index 83917f4..e82c097 100644 --- a/Arduino/McLighting/version_info.ino +++ b/Arduino/McLighting/version_info.ino @@ -66,9 +66,9 @@ * - Modify platformio.ini for future bump to esp8266-arduino v2.5.0 (shamelessly stolen settings from espurna project) * - Gzipped index2.htm & edit.htm.gz(untouched), convereted to hex format using xxd -i abcd.gz > html_gz.h * - Pointers added for WS2812FX & NeoPixelBus - * - new "REST API": /pixels?ct=xxx to change length of LED strip - * - new "REST API": /pixels?rgbo=xxx to change RGB order - * - new "REST API": /pixels?pin=GPIO_NO to change PIN# (Allowed GPIO values: 16/5/4/0/2/14/12/13/15/3/1) + * - new "REST API": /pixelconf?ct=xxx to change length of LED strip + * - new "REST API": /pixelconf?rgbo=xxx to change RGB order + * - new "REST API": /pixelconf?pin=GPIO_NO to change PIN# (Allowed GPIO values: 16/5/4/0/2/14/12/13/15/3/1) * - added HA 0.87 version support https://github.com/toblum/McLighting/issues/327 * - Added alternative way to send large messages using PubSubClient * - Bump PIO core to 2.0.1