Pass data from DMX to existing universe handling code

This commit is contained in:
Will Tatam
2023-02-18 13:33:38 +00:00
parent ef48b1f5cd
commit 4903ec6bb9
2 changed files with 5 additions and 2 deletions

View File

@@ -102,6 +102,7 @@ void initDMX() {}
void handleDMXInput() {
dmx.update();
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

View File

@@ -79,7 +79,9 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){
handleDDPPacket(p);
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
// does not act on out-of-order packets yet
if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) {