no broadcast when dispatched

This commit is contained in:
2018-09-30 22:38:00 +02:00
parent 284d40d0b8
commit 3959cb0b94
4 changed files with 23 additions and 18 deletions

View File

@@ -128,6 +128,7 @@ class IlluCat : public MeshSprocket {
if(type == WS_EVT_DATA){
String frame = WsUtils::parseFrameAsString(type, arg, data, len, 0);
dispatch(0, frame);
net->mesh.sendBroadcast(frame);
}
}
@@ -136,9 +137,6 @@ class IlluCat : public MeshSprocket {
if(currentMessage.valid){
currentMessage.from = from;
publish(currentMessage.topic, currentMessage.payload);
if(currentMessage.broadcast){
net->mesh.sendBroadcast(msg);
}
}
}

View File

@@ -81,6 +81,7 @@ class PixelPlugin : public Plugin {
}
void setPattern(String msg){
pixels->Index = 0;
pixels->Direction = FORWARD;
pixels->ActivePattern = (pattern)atoi(msg.c_str());
}
void animate(){