mirror of
https://github.com/rainloreley/artnet-usbdmx-converter.git
synced 2024-12-03 13:53:02 +01:00
check channel and value data before sending
This commit is contained in:
parent
f36cc53be1
commit
8e3d303e51
|
@ -65,8 +65,10 @@ export default class ConvertHandler {
|
|||
this.usbdmxInCounter++;
|
||||
if (this.outputAllowed) {
|
||||
for (let i = 0; i < data.length; 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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user