Clear effect pixels on onSetPixel
This commit is contained in:
parent
eb90a99acd
commit
939bc687ef
|
@ -42,6 +42,8 @@ void getRGBValues(uint32_t *rgbBuffer,uint32_t const color){
|
||||||
|
|
||||||
bool onSetPixel(const HomieRange& range, const String& value){
|
bool onSetPixel(const HomieRange& range, const String& value){
|
||||||
if(!range.isRange){
|
if(!range.isRange){
|
||||||
|
effect = "none";
|
||||||
|
pixels.clear();
|
||||||
for(int i=0;i<pixels.numPixels();i++){
|
for(int i=0;i<pixels.numPixels();i++){
|
||||||
pixels.setPixelColor(i, value.toInt());
|
pixels.setPixelColor(i, value.toInt());
|
||||||
}
|
}
|
||||||
|
@ -107,7 +109,6 @@ void loopHandler() {
|
||||||
if(lastCall + wait < millis()){
|
if(lastCall + wait < millis()){
|
||||||
state++;
|
state++;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
for(int i = 0; i < pixels.numPixels()-EyeSize-2; i++) {
|
for(int i = 0; i < pixels.numPixels()-EyeSize-2; i++) {
|
||||||
|
|
Loading…
Reference in New Issue