Clear effect pixels on onSetPixel

This commit is contained in:
Juergen Jung 2017-02-16 20:51:48 +01:00
parent eb90a99acd
commit 939bc687ef
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,8 @@ void getRGBValues(uint32_t *rgbBuffer,uint32_t const color){
bool onSetPixel(const HomieRange& range, const String& value){
if(!range.isRange){
effect = "none";
pixels.clear();
for(int i=0;i<pixels.numPixels();i++){
pixels.setPixelColor(i, value.toInt());
}
@ -107,7 +109,6 @@ void loopHandler() {
if(lastCall + wait < millis()){
state++;
}
break;
case 1:
for(int i = 0; i < pixels.numPixels()-EyeSize-2; i++) {