From fcbde5e234f5960aed2dfbd3e8f9c804408fb817 Mon Sep 17 00:00:00 2001 From: Tobias Blum Date: Sun, 5 Jun 2016 00:41:50 +0200 Subject: [PATCH] Bugfix for mode change when using websockets API. --- Arduino/McLighting/request_handlers.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index fe6f5f9..78affa6 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -168,7 +168,8 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght } strip.show(); DBG_OUTPUT_PORT.printf("WS: Set all leds to main color: [%u] [%u] [%u]\n", main_color.red, main_color.green, main_color.blue); - mode = HOLD; + exit_func = true; + mode = ALL; webSocket.sendTXT(num, "OK"); } @@ -190,7 +191,8 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght } strip.show(); } - mode = HOLD; + exit_func = true; + mode = ALL; webSocket.sendTXT(num, "OK"); }