Turn dmx_into into class with state.

This is much nicer to read and in the future more state will be added to support all the rdm stuff.
This commit is contained in:
Arne
2023-08-14 15:18:54 +02:00
committed by Will Tatam
parent 0ad31c90f6
commit a3bcf92ea5
4 changed files with 111 additions and 70 deletions

View File

@@ -67,6 +67,9 @@ void WLED::loop()
#ifdef WLED_ENABLE_DMX
handleDMX();
#endif
#ifdef WLED_ENABLE_DMX_INPUT
dmxInput.update();
#endif
#ifdef WLED_DEBUG
unsigned long usermodMillis = millis();
@@ -527,7 +530,8 @@ void WLED::setup()
initDMX();
#endif
#ifdef WLED_ENABLE_DMX_INPUT
initDMXInput();
const uint8_t dmxInputPortNumber = 2; //TODO turn into config variable?!
dmxInput.init(dmxInputReceivePin, dmxInputTransmitPin, dmxInputEnablePin, dmxInputPortNumber);
#endif
#ifdef WLED_ENABLE_ADALIGHT