mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-16 10:04:30 +01:00
fix completion, add moar events
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
|
||||
using namespace std;
|
||||
using namespace std::placeholders;
|
||||
|
||||
|
||||
/**
|
||||
* Original NeoPattern code by Bill Earl
|
||||
@@ -28,7 +27,7 @@ class NeoPattern : public Adafruit_NeoPixel
|
||||
|
||||
// Member Variables:
|
||||
pattern ActivePattern; // which pattern is running
|
||||
direction Direction; // direction to run the pattern
|
||||
direction Direction = FORWARD; // direction to run the pattern
|
||||
|
||||
unsigned long Interval = 150; // milliseconds between updates
|
||||
unsigned long lastUpdate = 0; // last update of position
|
||||
@@ -52,12 +51,15 @@ class NeoPattern : public Adafruit_NeoPixel
|
||||
NeoPattern(uint16_t pixels, uint8_t pin, uint8_t type)
|
||||
:Adafruit_NeoPixel(pixels, pin, type)
|
||||
{
|
||||
//OnComplete = bind(&NeoPattern::onCompleteDefault, this, _1);
|
||||
TotalSteps = numPixels();
|
||||
}
|
||||
|
||||
void onCompleteDefault(int pixels) {
|
||||
if(ActivePattern != RAINBOW_CYCLE){
|
||||
//Serial.println("reversing");
|
||||
//Serial.println("onCompleteDefault");
|
||||
// FIXME no specific code
|
||||
if(ActivePattern == THEATER_CHASE){
|
||||
return;
|
||||
}
|
||||
Reverse();
|
||||
//Serial.println("pattern completed");
|
||||
|
||||
Reference in New Issue
Block a user