pull/395/head
cschwinne 2019-11-26 20:41:15 +01:00
rodzic ce89a92d0d
commit 2e4f2639a3
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -55,20 +55,21 @@ void WS2812FX::init(bool supportWhite, uint16_t countPixels, bool skipFirst)
}
void WS2812FX::service() {
now = millis() + timebase; // Be aware, millis() rolls over every 49 days
if (now - _lastShow < MIN_SHOW_DELAY) return;
uint32_t nowUp = millis(); // Be aware, millis() rolls over every 49 days
now = nowUp + timebase;
if (nowUp - _lastShow < MIN_SHOW_DELAY) return;
bool doShow = false;
for(uint8_t i=0; i < MAX_NUM_SEGMENTS; i++)
{
_segment_index = i;
if (SEGMENT.isActive())
{
if(now > SEGENV.next_time || _triggered || (doShow && SEGMENT.mode == 0)) //last is temporary
if(nowUp > SEGENV.next_time || _triggered || (doShow && SEGMENT.mode == 0)) //last is temporary
{
doShow = true;
handle_palette();
uint16_t delay = (this->*_mode[SEGMENT.mode])();
SEGENV.next_time = now + delay;
SEGENV.next_time = millis() + delay;
if (SEGMENT.mode != FX_MODE_HALLOWEEN_EYES) SEGENV.call++;
}
}

Wyświetl plik

@ -99,7 +99,7 @@
//version code in format yymmddb (b = daily build)
#define VERSION 1911251
#define VERSION 1911261
char versionString[] = "0.8.7-dev";