Fix Art-Net TX/RX mapping and add natural sort to tables
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,7 +60,8 @@
|
|||||||
"Bash(git clone:*)",
|
"Bash(git clone:*)",
|
||||||
"Bash(go work use:*)",
|
"Bash(go work use:*)",
|
||||||
"Bash(go mod init:*)",
|
"Bash(go mod init:*)",
|
||||||
"Bash(git push:*)"
|
"Bash(git push:*)",
|
||||||
|
"Bash(go doc:*)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,11 +22,12 @@ func (t *Tendrils) startSACNDiscoveryListener(ctx context.Context, iface net.Int
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.DebugSACN {
|
// TODO: remove debug logging
|
||||||
log.Printf("[sacn] listening for discovery on %s", iface.Name)
|
log.Printf("[sacn] listening for discovery on %s", iface.Name)
|
||||||
}
|
|
||||||
|
|
||||||
receiver.SetHandler(func(src *net.UDPAddr, pkt interface{}) {
|
receiver.SetHandler(func(src *net.UDPAddr, pkt interface{}) {
|
||||||
|
// TODO: remove debug logging
|
||||||
|
log.Printf("[sacn] received packet from %s", src)
|
||||||
if disc, ok := pkt.(*sacn.DiscoveryPacket); ok {
|
if disc, ok := pkt.(*sacn.DiscoveryPacket); ok {
|
||||||
t.handleSACNDiscoveryPacket(src.IP, disc)
|
t.handleSACNDiscoveryPacket(src.IP, disc)
|
||||||
}
|
}
|
||||||
@@ -34,6 +35,8 @@ func (t *Tendrils) startSACNDiscoveryListener(ctx context.Context, iface net.Int
|
|||||||
|
|
||||||
receiver.Start()
|
receiver.Start()
|
||||||
<-ctx.Done()
|
<-ctx.Done()
|
||||||
|
// TODO: remove debug logging
|
||||||
|
log.Printf("[sacn] discovery listener exiting on %s", iface.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Tendrils) handleSACNDiscoveryPacket(srcIP net.IP, pkt *sacn.DiscoveryPacket) {
|
func (t *Tendrils) handleSACNDiscoveryPacket(srcIP net.IP, pkt *sacn.DiscoveryPacket) {
|
||||||
|
|||||||
@@ -2434,7 +2434,8 @@
|
|||||||
}
|
}
|
||||||
va = String(va).toLowerCase();
|
va = String(va).toLowerCase();
|
||||||
vb = String(vb).toLowerCase();
|
vb = String(vb).toLowerCase();
|
||||||
return asc ? va.localeCompare(vb) : vb.localeCompare(va);
|
const cmp = va.localeCompare(vb, undefined, { numeric: true, sensitivity: 'base' });
|
||||||
|
return asc ? cmp : -cmp;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2626,11 +2627,11 @@
|
|||||||
|
|
||||||
nodes.forEach(node => {
|
nodes.forEach(node => {
|
||||||
const name = getLabel(node);
|
const name = getLabel(node);
|
||||||
(node.artnet_outputs || []).forEach(u => {
|
(node.artnet_inputs || []).forEach(u => {
|
||||||
if (!txByUniverse.has(u)) txByUniverse.set(u, []);
|
if (!txByUniverse.has(u)) txByUniverse.set(u, []);
|
||||||
txByUniverse.get(u).push(name);
|
txByUniverse.get(u).push(name);
|
||||||
});
|
});
|
||||||
(node.artnet_inputs || []).forEach(u => {
|
(node.artnet_outputs || []).forEach(u => {
|
||||||
if (!rxByUniverse.has(u)) rxByUniverse.set(u, []);
|
if (!rxByUniverse.has(u)) rxByUniverse.set(u, []);
|
||||||
rxByUniverse.get(u).push(name);
|
rxByUniverse.get(u).push(name);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user