kopia lustrzana https://github.com/Aircoookie/WLED
pull/395/head
rodzic
ce89a92d0d
commit
2e4f2639a3
|
@ -55,20 +55,21 @@ void WS2812FX::init(bool supportWhite, uint16_t countPixels, bool skipFirst)
|
||||||
}
|
}
|
||||||
|
|
||||||
void WS2812FX::service() {
|
void WS2812FX::service() {
|
||||||
now = millis() + timebase; // Be aware, millis() rolls over every 49 days
|
uint32_t nowUp = millis(); // Be aware, millis() rolls over every 49 days
|
||||||
if (now - _lastShow < MIN_SHOW_DELAY) return;
|
now = nowUp + timebase;
|
||||||
|
if (nowUp - _lastShow < MIN_SHOW_DELAY) return;
|
||||||
bool doShow = false;
|
bool doShow = false;
|
||||||
for(uint8_t i=0; i < MAX_NUM_SEGMENTS; i++)
|
for(uint8_t i=0; i < MAX_NUM_SEGMENTS; i++)
|
||||||
{
|
{
|
||||||
_segment_index = i;
|
_segment_index = i;
|
||||||
if (SEGMENT.isActive())
|
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;
|
doShow = true;
|
||||||
handle_palette();
|
handle_palette();
|
||||||
uint16_t delay = (this->*_mode[SEGMENT.mode])();
|
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++;
|
if (SEGMENT.mode != FX_MODE_HALLOWEEN_EYES) SEGENV.call++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
|
|
||||||
//version code in format yymmddb (b = daily build)
|
//version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 1911251
|
#define VERSION 1911261
|
||||||
char versionString[] = "0.8.7-dev";
|
char versionString[] = "0.8.7-dev";
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue