Merge pull request #53 from FabLab-Luenen/development

Update McLighting.ino
This commit is contained in:
bpohvoodoo
2019-10-26 10:13:28 +02:00
committed by GitHub
4 changed files with 21 additions and 15 deletions
+1 -2
View File
@@ -839,9 +839,8 @@ void loop() {
// Segment change only if color and speed transitions are finished, because they are segment specific // Segment change only if color and speed transitions are finished, because they are segment specific
if (prevsegment != State.segment) { if (prevsegment != State.segment) {
DBG_OUTPUT_PORT.println("Segment not equal"); DBG_OUTPUT_PORT.println("Segment not equal");
//if ((segState.mode[State.segment] == FX_MODE_CUSTOM_0) || (segState.mode[State.segment] == FX_MODE_CUSTOM_2) || (segState.mode[prevsegment] == FX_MODE_CUSTOM_0)) { //if ((segState.mode[State.segment] == FX_MODE_CUSTOM_0) || (segState.mode[State.segment] == FX_MODE_CUSTOM_2) || (segState.mode[prevsegment] == FX_MODE_CUSTOM_0)) {
if ((segState.mode[State.segment] == FX_MODE_CUSTOM_0) || (segState.mode[prevsegment] == FX_MODE_CUSTOM_0)) { if ((segState.mode[State.segment] == FX_MODE_CUSTOM_0) || (segState.mode[prevsegment] == FX_MODE_CUSTOM_0)) {
}
fx_speed = segState.speed[State.segment]; fx_speed = segState.speed[State.segment];
DBG_OUTPUT_PORT.printf("Switched segment from: %i to %i", prevsegment, State.segment); DBG_OUTPUT_PORT.printf("Switched segment from: %i to %i", prevsegment, State.segment);
prevsegment = State.segment; prevsegment = State.segment;
+12 -12
View File
@@ -799,18 +799,18 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
} }
if (root.containsKey("color")) { if (root.containsKey("color")) {
JsonObject color = root["color"]; JsonObject color = root["color"];
main_color.red = (uint8_t) color["r"]; if (color.containsKey("r")) { main_color.red = (uint8_t) color["r"]; }
main_color.green = (uint8_t) color["g"]; if (color.containsKey("g")) { main_color.green = (uint8_t) color["g"]; }
main_color.blue = (uint8_t) color["b"]; if (color.containsKey("b")) { main_color.blue = (uint8_t) color["b"]; }
main_color.white = (uint8_t) color["w"]; if (color.containsKey("w")) { main_color.white = (uint8_t) color["w"]; }
back_color.red = (uint8_t) color["r2"]; if (color.containsKey("r2")) { back_color.red = (uint8_t) color["r2"]; }
back_color.green = (uint8_t) color["g2"]; if (color.containsKey("g2")) { back_color.green = (uint8_t) color["g2"]; }
back_color.blue = (uint8_t) color["b2"]; if (color.containsKey("b2")) { back_color.blue = (uint8_t) color["b2"]; }
back_color.white = (uint8_t) color["w2"]; if (color.containsKey("w2")) { back_color.white = (uint8_t) color["w2"]; }
xtra_color.red = (uint8_t) color["r3"]; if (color.containsKey("r3")) { xtra_color.red = (uint8_t) color["r3"]; }
xtra_color.green = (uint8_t) color["g3"]; if (color.containsKey("g3")) { xtra_color.green = (uint8_t) color["g3"]; }
xtra_color.blue = (uint8_t) color["b3"]; if (color.containsKey("b3")) { xtra_color.blue = (uint8_t) color["b3"]; }
xtra_color.white = (uint8_t) color["w3"]; if (color.containsKey("w3")) { xtra_color.white = (uint8_t) color["w3"]; }
_updateSegState = true; _updateSegState = true;
} }
+1 -1
View File
@@ -1 +1 @@
#define SKETCH_VERSION "3.1.0.BETA4" #define SKETCH_VERSION "3.1.0.BETA5"
+7
View File
@@ -230,4 +230,11 @@
* adressed issue: #48 * adressed issue: #48
* known problems: E1.31 is only working for one segment at the moment * known problems: E1.31 is only working for one segment at the moment
* *
* 26 October
* Version Bump to 3.1.0.BETA5
* adressed issue: #44
* known problems:
* Homeassistant will allways use active segment
* E1.31 is only working for one segment at the moment
*
*/ */