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