You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lights.header.isPositions = lights.header.nrOfLights ? 2 : 3; // filled with positions, set back to 3 in ModuleEffects, or direct to 3 if no lights (effects will move it to 0)
if (_socket->getConnectedClients() && _state.data["monitorOn"]) {
359
366
_socket->emitEvent("monitor", (char*)&layerP.lights.header, 37); // sizeof(LightsHeader)); //sizeof(LightsHeader), nearest prime nr above 32 to avoid monitor data to be seen as header
360
367
_socket->emitEvent("monitor", (char*)layerP.lights.channelsE, MIN(layerP.lights.header.nrOfLights * 3, layerP.lights.maxChannels)); //*3 is for 3 bytes position
361
368
}
362
369
memset(layerP.lights.channelsE, 0, layerP.lights.maxChannels); // set all the channels to 0 //cleaning the positions
363
-
EXT_LOGD(ML_TAG, "positions sent to monitor (2 -> 3, #L:%d maxC:%d)", layerP.lights.header.nrOfLights, layerP.lights.maxChannels);
370
+
xSemaphoreTake(swapMutex, portMAX_DELAY);
371
+
EXT_LOGD(ML_TAG, "positions sent to monitor (2 -> 3)");
_socket->emitEvent("monitor", (char*)layerP.lights.channelsD, MIN(layerP.lights.header.nrOfChannels, layerP.lights.maxChannels));// use channelsD as it won't be overwritten by effects during loop
0 commit comments