Closed k-yle closed 6 months ago
I would suggest to implement this in its own class. Like this:
class ReceiverMerge extends Receiver{
contructor(...){
super(...);
super.on("packet",this.mergePacket);
}
mergePacket(packet: Packet){
// merge
}
}
I'm currently working on a project where this feature might be usefull. I will try to code this the next days.
+1 for adding a "merge receiver" layer on top of a basic receiver. This is the approach we (ETC) use in our C implementation. docs
Thats what I coded so far: There might be minor bugs. Haven't tested this much. But it should work.
https://gist.github.com/hansSchall/e30c980d638ba239a15a752383b1a365
I will be able to test it on Sunday.
if the
priority
value is the same from two senders, the DMX slot data needs to be merged. ETC's implementation could be used.