added custom effect to MQTT
This commit is contained in:
@@ -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.
@@ -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
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user