mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-18 02:36:40 +01:00
reorder fnc calls
This commit is contained in:
@@ -42,6 +42,10 @@ void PixelPlugin::defaultAnimation() {
|
||||
|
||||
void PixelPlugin::activate(Scheduler *userScheduler, Network *network)
|
||||
{
|
||||
animation.set(TASK_MILLISECOND * pixelConfig.updateInterval, TASK_FOREVER, bind(&PixelPlugin::animate, this));
|
||||
userScheduler->addTask(animation);
|
||||
animation.enable();
|
||||
|
||||
subscribe("pixels/colorWheel", bind(&PixelPlugin::colorWheel, this, _1));
|
||||
subscribe("pixels/color", bind(&PixelPlugin::setColor, this, _1));
|
||||
subscribe("pixels/color2", bind(&PixelPlugin::setColor2, this, _1));
|
||||
@@ -50,9 +54,6 @@ void PixelPlugin::activate(Scheduler *userScheduler, Network *network)
|
||||
subscribe("pixels/brightness", bind(&PixelPlugin::setBrightness, this, _1));
|
||||
subscribe("pixels/state", bind(&PixelPlugin::setState, this, _1));
|
||||
|
||||
animation.set(TASK_MILLISECOND * pixelConfig.updateInterval, TASK_FOREVER, bind(&PixelPlugin::animate, this));
|
||||
userScheduler->addTask(animation);
|
||||
animation.enable();
|
||||
PRINT_MSG(Serial, SPROCKET_TYPE, "NeoPixels activated");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user