mirror of
https://gitlab.com/wirelos/sprocket-plugin-neopixel.git
synced 2025-12-14 13:51:28 +01:00
add wheel for color2
This commit is contained in:
@@ -49,6 +49,7 @@ void PixelPlugin::activate(Scheduler *userScheduler)
|
||||
animation.enable();
|
||||
|
||||
subscribe("pixels/colorWheel", bind(&PixelPlugin::colorWheel, this, _1));
|
||||
subscribe("pixels/colorWheel2", bind(&PixelPlugin::colorWheel2, this, _1));
|
||||
subscribe("pixels/color", bind(&PixelPlugin::setColor, this, _1));
|
||||
subscribe("pixels/color2", bind(&PixelPlugin::setColor2, this, _1));
|
||||
subscribe("pixels/pattern", bind(&PixelPlugin::setPattern, this, _1));
|
||||
@@ -79,6 +80,10 @@ void PixelPlugin::colorWheel(String msg)
|
||||
pixels->ActivePattern = NONE;
|
||||
pixels->ColorSet(pixels->Wheel(color));
|
||||
}
|
||||
void PixelPlugin::colorWheel2(String msg)
|
||||
{
|
||||
pixels->Color2 = pixels->Wheel(atoi(msg.c_str()));
|
||||
}
|
||||
|
||||
void PixelPlugin::setTotalSteps(String msg)
|
||||
{
|
||||
|
||||
@@ -44,6 +44,7 @@ class PixelPlugin : public Plugin
|
||||
void defaultAnimation();
|
||||
void setState(String msg);
|
||||
void colorWheel(String msg);
|
||||
void colorWheel2(String msg);
|
||||
void setTotalSteps(String msg);
|
||||
void setBrightness(String msg);
|
||||
void setColor(String msg);
|
||||
|
||||
Reference in New Issue
Block a user