moar topics

This commit is contained in:
2018-09-17 15:34:24 +02:00
parent 939f167dad
commit ad8ba61986
7 changed files with 91 additions and 12 deletions

View File

@@ -30,11 +30,12 @@ class NeoPattern : public Adafruit_NeoPixel
pattern ActivePattern; // which pattern is running
direction Direction; // direction to run the pattern
unsigned long Interval; // milliseconds between updates
unsigned long lastUpdate; // last update of position
unsigned long Interval = 150; // milliseconds between updates
unsigned long lastUpdate = 0; // last update of position
uint32_t Color1, Color2; // What colors are in use
uint16_t TotalSteps; // total number of steps in the pattern
uint32_t Color1 = 0;
uint32_t Color2 = 0; // What colors are in use
uint16_t TotalSteps = 255; // total number of steps in the pattern
uint16_t Index; // current step within the pattern
uint16_t completed = 0;
@@ -45,19 +46,20 @@ class NeoPattern : public Adafruit_NeoPixel
:Adafruit_NeoPixel(pixels, pin, type)
{
OnComplete = callback;
TotalSteps = numPixels();
}
NeoPattern(uint16_t pixels, uint8_t pin, uint8_t type)
:Adafruit_NeoPixel(pixels, pin, type)
{
TotalSteps = numPixels();
}
void onCompleteDefault(int pixels) {
if(ActivePattern != RAINBOW_CYCLE){
//Serial.println("reversing");
Reverse();
}
Reverse();
//Serial.println("pattern completed");
}