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
parent 3ee003a400
commit f4c8a31be9
4 changed files with 109 additions and 71 deletions

View File

@@ -124,7 +124,7 @@ void WLED::loop()
handleDMX();
#endif
#ifdef WLED_ENABLE_DMX_INPUT
handleDMXInput();
dmxInput.update();
#endif
userLoop();
@@ -696,7 +696,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