Should fix bug that beeper won't turn off if turning the feature off in ledstrip menu
This commit is contained in:
@ -114,13 +114,13 @@ void updateLedStrip()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_disabled_beeper == false && !(cpputils::is_in(blinkAnimation, LEDSTRIP_OVERWRITE_BLINKLEFT, LEDSTRIP_OVERWRITE_BLINKRIGHT, LEDSTRIP_OVERWRITE_BLINKBOTH)))
|
if (have_disabled_beeper == false && (!(cpputils::is_in(blinkAnimation, LEDSTRIP_OVERWRITE_BLINKLEFT, LEDSTRIP_OVERWRITE_BLINKRIGHT, LEDSTRIP_OVERWRITE_BLINKBOTH)) || !settings.ledstrip.enableBeepWhenBlink))
|
||||||
{
|
{
|
||||||
for (Controller &controller : controllers)
|
for (Controller &controller : controllers)
|
||||||
controller.command.buzzer.freq = 0;
|
controller.command.buzzer.freq = 0;
|
||||||
have_disabled_beeper = true;
|
have_disabled_beeper = true;
|
||||||
}
|
}
|
||||||
else if (cpputils::is_in(blinkAnimation, LEDSTRIP_OVERWRITE_BLINKLEFT, LEDSTRIP_OVERWRITE_BLINKRIGHT, LEDSTRIP_OVERWRITE_BLINKBOTH)) have_disabled_beeper = false;
|
else if ((cpputils::is_in(blinkAnimation, LEDSTRIP_OVERWRITE_BLINKLEFT, LEDSTRIP_OVERWRITE_BLINKRIGHT, LEDSTRIP_OVERWRITE_BLINKBOTH)) && settings.ledstrip.enableBeepWhenBlink) have_disabled_beeper = false;
|
||||||
|
|
||||||
FastLED.setMaxPowerInVoltsAndMilliamps(5,settings.ledstrip.deziampere * 100);
|
FastLED.setMaxPowerInVoltsAndMilliamps(5,settings.ledstrip.deziampere * 100);
|
||||||
FastLED.show();
|
FastLED.show();
|
||||||
|
Reference in New Issue
Block a user