add wheel for color2

This commit is contained in:
2018-11-18 11:35:25 +01:00
parent 029a242ed1
commit ae9e1ffb41
2 changed files with 6 additions and 0 deletions

View File

@@ -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)
{

View File

@@ -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);