From 574c82b55dcdac6f85f5dfe024ef8b3b2b2e1ba7 Mon Sep 17 00:00:00 2001 From: debsahu Date: Sat, 7 Apr 2018 22:05:13 -0400 Subject: [PATCH] Messed Up Speed --- Arduino/McLighting/McLighting.ino | 4 ++-- Arduino/McLighting/request_handlers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 708b4fd..ab2e103 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -863,7 +863,7 @@ void loop() { if (mode == SET_MODE) { DBG_OUTPUT_PORT.printf("SET_MODE: %d %d\n", ws2812fx_mode, mode); strip.setMode(ws2812fx_mode); - mode = HOLD; + mode = SETSPEED; } if (mode == OFF) { // strip.setColor(0,0,0); @@ -882,7 +882,7 @@ void loop() { } if (mode == SETSPEED) { strip.setSpeed(convertSpeed(ws2812fx_speed)); - // mode = HOLD; + mode = HOLD; } if (mode == BRIGHTNESS) { strip.setBrightness(brightness); diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index 543639e..b81f737 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -746,7 +746,7 @@ void checkForRequests() { uint8_t json_speed = constrain((uint8_t) root["speed"], 0, 255); if (json_speed != ws2812fx_speed) { ws2812fx_speed = json_speed; - mode = SETSPEED; + if(stateOn) mode = SETSPEED; } }