Pass data from DMX to existing universe handling code
This commit is contained in:
@@ -102,6 +102,7 @@ void initDMX() {}
|
|||||||
void handleDMXInput() {
|
void handleDMXInput() {
|
||||||
dmx.update();
|
dmx.update();
|
||||||
dmx.read(1); // TODO - handle code
|
dmx.read(1); // TODO - handle code
|
||||||
DEBUG_PRINTF("DMX channel 1 = %u", dmx.read(1)); // TODO: remove from final code
|
handleDMXData(1, 512, e131_data, 1, REALTIME_MODE_DMX);
|
||||||
|
DEBUG_PRINTF("DMX channel 1 = %u\n", dmx.read(1)); // TODO: remove from final code
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -79,7 +79,9 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){
|
|||||||
handleDDPPacket(p);
|
handleDDPPacket(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
handleDMXData(uni, dmxChannels, e131_data, seq, mde);
|
||||||
|
}
|
||||||
|
void handleDMXData(uint16_t uni, uint16_t dmxChannels, uint8_t* e131_data, uint8_t seq, uint8_t mde) {
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
// does not act on out-of-order packets yet
|
// does not act on out-of-order packets yet
|
||||||
if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) {
|
if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) {
|
||||||
|
|||||||
Reference in New Issue
Block a user