From a6b52a6e1ecb29346af8c22441804c5e38d70f9d Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 18 Feb 2023 14:44:29 +0000 Subject: [PATCH] Read DMX values into array to be sent to handleDMXData --- wled00/dmx.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wled00/dmx.cpp b/wled00/dmx.cpp index 6febf1ec..4ef4c589 100644 --- a/wled00/dmx.cpp +++ b/wled00/dmx.cpp @@ -101,8 +101,11 @@ void initDMX() {} #ifdef WLED_ENABLE_DMX_INPUT void handleDMXInput() { dmx.update(); - dmx.read(1); // TODO - handle code - handleDMXData(1, 512, e131_data, 1, REALTIME_MODE_DMX); + uint8_t data[512] = {}; + for(int i=0; i < 512; i++) { + data[i] = dmx.read(i + 1); + } + handleDMXData(1, 512, data, 1, REALTIME_MODE_DMX, 0); DEBUG_PRINTF("DMX channel 1 = %u\n", dmx.read(1)); // TODO: remove from final code } #endif \ No newline at end of file