add enable/disable methods for dmxInput

This commit is contained in:
Arne 2023-08-17 16:53:48 +02:00 committed by Will Tatam
parent 5525a21696
commit 033c7abe62
2 changed files with 19 additions and 0 deletions

View File

@ -147,4 +147,19 @@ void DMXInput::turnOnAllLeds()
strip.show();
}
void DMXInput::disable()
{
if (initialized)
{
dmx_driver_disable(inputPortNum);
}
}
void DMXInput::enable()
{
if(initialized)
{
dmx_driver_enable(inputPortNum);
}
}
#endif

View File

@ -12,6 +12,10 @@ public:
void init(uint8_t rxPin, uint8_t txPin, uint8_t enPin, uint8_t inputPortNum);
void update();
/**disable dmx receiver (do this before disabling the cache)*/
void disable();
void enable();
private:
/// overrides everything and turns on all leds