Inital code on adding DMX input support

This commit is contained in:
Will Tatam
2023-02-18 13:17:09 +00:00
parent da3acc4627
commit 77d7567707
4 changed files with 13 additions and 0 deletions

View File

@@ -94,3 +94,11 @@ void initDMX() {
void handleDMX() {}
void initDMX() {}
#endif
#ifdef WLED_ENABLE_DMX_INPUT
void handleDMXInput() {
dmx.update();
dmx.read(1); // TODO - handle code
DEBUG_PRINTF("DMX channel 1 = %u", dmx.read(1)); // TODO: remove from final code
}
#endif

View File

@@ -78,6 +78,7 @@ uint32_t gamma32(uint32_t);
//dmx.cpp
void initDMX();
void handleDMX();
void handleDMXInput();
//e131.cpp
void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol);

View File

@@ -56,6 +56,9 @@ void WLED::loop()
handleTransitions();
#ifdef WLED_ENABLE_DMX
handleDMX();
#endif
#ifdef WLED_ENABLE_DMX_INPUT
handleDMXInput();
#endif
userLoop();

View File

@@ -33,6 +33,7 @@
#endif
#define WLED_ENABLE_ADALIGHT // saves 500b only (uses GPIO3 (RX) for serial)
//#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2)
#define WLED_ENABLE_DMX_INPUT // Listen for DMX over Serial
//#define WLED_ENABLE_JSONLIVE // peek LED output via /json/live (WS binary peek is always enabled)
#ifndef WLED_DISABLE_LOXONE
#define WLED_ENABLE_LOXONE // uses 1.2kb