mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-16 10:04:30 +01:00
add stuff
This commit is contained in:
@@ -27,6 +27,7 @@ class PixelPlugin : public Plugin {
|
||||
pixels->setBrightness(pixelConfig.brightness);
|
||||
}
|
||||
void activate(Scheduler* userScheduler, Network* network){
|
||||
subscribe("pixels/colorWheel", bind(&PixelPlugin::colorWheel, 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));
|
||||
@@ -43,6 +44,11 @@ class PixelPlugin : public Plugin {
|
||||
void setState(String msg){
|
||||
state.fromJsonString(msg);
|
||||
}
|
||||
void colorWheel(String msg){
|
||||
int color = atoi(msg.c_str());
|
||||
pixels->ActivePattern = NONE;
|
||||
pixels->ColorSet(pixels->Wheel(color));
|
||||
}
|
||||
void setTotalSteps(String msg){
|
||||
pixels->TotalSteps = atoi(msg.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user