check channel and value data before sending

This commit is contained in:
Adrian Baumgart 2024-05-09 01:03:27 +02:00
parent f36cc53be1
commit 8e3d303e51
No known key found for this signature in database

View File

@ -65,7 +65,9 @@ export default class ConvertHandler {
this.usbdmxInCounter++;
if (this.outputAllowed) {
for (let i = 0; i < data.length; i++) {
this.artNetSender.prepChannel(startChannel + i, data[i]);
if ((startChannel + i) >= 0 && (startChannel + i) < 512 && data[i] >= 0 && data[i] < 256) {
this.artNetSender.prepChannel(startChannel + i, data[i]);
}
}
this.artnetOutCounter++;
this.artNetSender.transmit();