Use LedManager to call loop function on Leds
This commit is contained in:
parent
6b600e021e
commit
c7cf91a412
2 changed files with 8 additions and 5 deletions
|
@ -20,6 +20,13 @@ public:
|
|||
_timers->add(id, [&]() { leds->off(); });
|
||||
}
|
||||
|
||||
void loop() {
|
||||
for (auto iterator = _leds.begin(); iterator != _leds.end(); ++iterator) {
|
||||
auto leds = iterator->second;
|
||||
leds->loop();
|
||||
}
|
||||
}
|
||||
|
||||
void setLedProperties(int id, bool on, float brightness, unsigned long timer) {
|
||||
if (!_leds.count(id))
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue