fix some stuff

This commit is contained in:
2018-09-13 00:04:06 +02:00
parent d2a818af74
commit beacbb2fb3
8 changed files with 59 additions and 35 deletions

View File

@@ -55,9 +55,10 @@ class NeoPattern : public Adafruit_NeoPixel
void onCompleteDefault(int pixels) {
if(ActivePattern != RAINBOW_CYCLE){
//Serial.println("reversing");
Reverse();
}
Serial.println("pattern completed");
//Serial.println("pattern completed");
}
// Update the pattern
@@ -109,7 +110,7 @@ class NeoPattern : public Adafruit_NeoPixel
{
OnComplete(numPixels()); // call the comlpetion callback
} else {
Reverse();
onCompleteDefault(numPixels());
}
}
}
@@ -124,7 +125,7 @@ class NeoPattern : public Adafruit_NeoPixel
{
OnComplete(numPixels()); // call the comlpetion callback
} else {
Reverse();
onCompleteDefault(numPixels());
}
}
}
@@ -313,7 +314,7 @@ class NeoPattern : public Adafruit_NeoPixel
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos)
{
if(WheelPos == 0) return Color(0,0,0);
//if(WheelPos == 0) return Color(0,0,0);
WheelPos = 255 - WheelPos;
if(WheelPos < 85)
{

View File

@@ -55,8 +55,8 @@ const PIXEL_FP PIXEL_FNCS[] = {
*/
[](NeoPattern* pixels, const char *id){
pattern p = (pattern)atoi(id);
pixels->Interval = 50;
pixels->TotalSteps = pixels->numPixels();
//pixels->Interval = 50;
//pixels->TotalSteps = pixels->numPixels();
pixels->ActivePattern = p;
}
};