diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index 6060aca7..fa8ff560 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -88,17 +88,18 @@ static bool _rfbToChar(byte * in, char * out, int n = RF_MESSAGE_SIZE) { #if WEB_SUPPORT -void _rfbWebSocketSendCodes() { +void _rfbWebSocketSendCodeArray(unsigned char start, unsigned char size) { DynamicJsonBuffer jsonBuffer; JsonObject& root = jsonBuffer.createObject(); - JsonObject& rfb = root.createObject("rfb"); - rfb["size"] = relayCount(); + JsonObject& rfb = root.createNestedObject("rfb"); + rfb["size"] = size; + rfb["start"] = start; JsonArray& on = rfb.createNestedArray("on"); JsonArray& off = rfb.createNestedArray("off"); - for (byte id=0; id