Skip to content

Commit

Permalink
Merge pull request Aircoookie#4407 from DedeHai/fairy_FX_fix
Browse files Browse the repository at this point in the history
BUGFIX for Fairy & Fairytwinkle FX
  • Loading branch information
DedeHai authored Dec 19, 2024
2 parents b4aa837 + e57c701 commit 217d2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ uint16_t mode_fairy() {
if (z == zones-1) flashersInZone = numFlashers-(flashersInZone*(zones-1));

for (unsigned f = firstFlasher; f < firstFlasher + flashersInZone; f++) {
unsigned stateTime = now16 - flashers[f].stateStart;
unsigned stateTime = uint16_t(now16 - flashers[f].stateStart);
//random on/off time reached, switch state
if (stateTime > flashers[f].stateDur * 10) {
flashers[f].stateOn = !flashers[f].stateOn;
Expand Down Expand Up @@ -1500,7 +1500,7 @@ uint16_t mode_fairytwinkle() {
unsigned maxDur = riseFallTime/100 + ((255 - SEGMENT.intensity) >> 2) + 13 + ((255 - SEGMENT.intensity) >> 1);

for (int f = 0; f < SEGLEN; f++) {
unsigned stateTime = now16 - flashers[f].stateStart;
uint16_t stateTime = now16 - flashers[f].stateStart;
//random on/off time reached, switch state
if (stateTime > flashers[f].stateDur * 100) {
flashers[f].stateOn = !flashers[f].stateOn;
Expand Down

0 comments on commit 217d2ae

Please sign in to comment.