mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-16 10:04:30 +01:00
moar topics
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user