From d546ea54f08c626ed3478fedad18f0fc459edd1f Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 19 Aug 2018 14:56:46 +0100 Subject: [PATCH] Untested fix to ensure we act on vendorcast/broadcast mute/unmute Untested, but should close #10 --- src/DMXSerial2.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/DMXSerial2.cpp b/src/DMXSerial2.cpp index 0794739..7f53510 100644 --- a/src/DMXSerial2.cpp +++ b/src/DMXSerial2.cpp @@ -522,7 +522,7 @@ void DMXSerialClass2::tick(void) } else if (Parameter == SWAPINT(E120_DISC_UN_MUTE)) { // 0x0003 isHandled = true; - if (packetIsForMe) { // 05.12.2013 + if (packetIsForMe || packetIsForGroup || packetIsForAll) { // For us, process unmute if (_rdm.packet.DataLength > 0) { // Unexpected data // Do nothing @@ -532,13 +532,15 @@ void DMXSerialClass2::tick(void) _rdm.packet.Data[0] = 0b00000000; _rdm.packet.Data[1] = 0b00000000; _rdm.packet.DataLength = 2; - respondMessage(true); // 21.11.2013 + if (packetIsForMe) { // Only actually respond if it's sent direct to us + respondMessage(true); // 21.11.2013 + } } } } else if (Parameter == SWAPINT(E120_DISC_MUTE)) { // 0x0002 isHandled = true; - if (packetIsForMe) { // 05.12.2013 + if (packetIsForMe || packetIsForGroup || packetIsForAll) { // For us, process unmute if (_rdm.packet.DataLength > 0) { // Unexpected data // Do nothing @@ -548,7 +550,9 @@ void DMXSerialClass2::tick(void) _rdm.packet.Data[0] = 0b00000000; _rdm.packet.Data[1] = 0b00000000; _rdm.packet.DataLength = 2; - respondMessage(true); // 21.11.2013 + if (packetIsForMe) { // Only actually respond if it's sent direct to us + respondMessage(true); // 21.11.2013 + } } }