added custom effect to MQTT

This commit is contained in:
bpohvoodoo
2019-03-31 14:31:18 +02:00
parent bd442ece90
commit a734762639
4 changed files with 13 additions and 4 deletions
+2 -2
View File
@@ -54,8 +54,8 @@
#endif
#if defined(ARDUINOJSON_VERSION)
#if !(ARDUINOJSON_VERSION_MAJOR == 6 and ARDUINOJSON_VERSION_MINOR == 9)
#error "Install ArduinoJson v6.9.x"
#if !(ARDUINOJSON_VERSION_MAJOR == 6 and ARDUINOJSON_VERSION_MINOR == 10)
#error "Install ArduinoJson v6.10.x"
#endif
#endif
Binary file not shown.
+10 -1
View File
@@ -1132,7 +1132,11 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
if (mode == E131){
root["effect"] = "E131";
} else {
root["effect"] = strip->getModeName(strip->getMode());
if (mode == CUSTOM){
root["effect"] = "CUSTOM WS";
} else {
root["effect"] = strip->getModeName(strip->getMode());
}
}
}
}
@@ -1248,6 +1252,9 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
mode = E131;
}
#endif
if(effectString == "CUSTOM WS"){
mode = CUSTOM;
}
for (uint8_t i = 0; i < strip->getModeCount(); i++) {
if(String(strip->getModeName(i)) == effectString) {
mode = SET_MODE;
@@ -1346,6 +1353,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
#if defined(ENABLE_E131)
effect_list.add("E131");
#endif
effect_list.add("CUSTOM WS");
for (uint8_t i = 0; i < strip->getModeCount(); i++) {
effect_list.add(strip->getModeName(i));
}
@@ -1458,6 +1466,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
#if defined(ENABLE_E131)
effect_list.add("E131");
#endif
effect_list.add("CUSTOM WS");
for (uint8_t i = 0; i < strip->getModeCount(); i++) {
effect_list.add(strip->getModeName(i));
}
+1 -1
View File
@@ -77,7 +77,7 @@ platform = ${common.platform}
board_build.f_cpu = 160000000L
build_flags =
${common.build_flags}
-Wl,-Teagle.flash.4m3m.ld ; Required for core > v2.5.0 or staging version
-Wl,-Teagle.flash.4m2m.ld ; Required for core > v2.5.0 or staging version
monitor_speed = ${common.monitor_speed}
upload_speed = ${common.upload_speed}
upload_resetmethod = ${common.upload_resetmethod}