From a025e0a35a95f8429e4f474b91eaa0966f5a77b6 Mon Sep 17 00:00:00 2001 From: Tobias Blum Date: Sun, 29 Oct 2017 00:20:57 +0200 Subject: [PATCH] Add new + command also to MQTT See: https://github.com/toblum/McLighting/pull/45 --- Arduino/McLighting/request_handlers.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index 8d4d10c..3011842 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -297,6 +297,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght webSocket.sendTXT(num, "OK"); } + // + ==> Set multiple LED in the given colors if (payload[0] == '+') { handleSetDifferentColors(payload); webSocket.sendTXT(num, "OK"); @@ -406,6 +407,12 @@ void checkForRequests() { DBG_OUTPUT_PORT.printf("MQTT: Set single LED in given color [%s]\n", payload); mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str()); } + + // + ==> Set multiple LED in the given colors + if (payload[0] == '+') { + handleSetDifferentColors(payload); + mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str()); + } // = ==> Activate named mode if (payload[0] == '=') {