Fix unused var warning (#16467)
This commit is contained in:
parent
d1e55a2d1d
commit
675295692b
1 changed files with 5 additions and 3 deletions
|
@ -58,7 +58,9 @@ void update_case_light() {
|
||||||
if (case_light_arg_flag && case_light_on)
|
if (case_light_arg_flag && case_light_on)
|
||||||
case_light_brightness = case_light_brightness_sav; // restore last brightens if this is an S1 argument
|
case_light_brightness = case_light_brightness_sav; // restore last brightens if this is an S1 argument
|
||||||
|
|
||||||
const uint8_t i = case_light_on ? case_light_brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i;
|
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL) || NONE(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_NO_BRIGHTNESS)
|
||||||
|
const uint8_t i = case_light_on ? case_light_brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
||||||
|
|
||||||
|
@ -71,13 +73,13 @@ void update_case_light() {
|
||||||
|
|
||||||
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
|
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
|
||||||
if (PWM_PIN(CASE_LIGHT_PIN))
|
if (PWM_PIN(CASE_LIGHT_PIN))
|
||||||
analogWrite(pin_t(CASE_LIGHT_PIN),
|
analogWrite(pin_t(CASE_LIGHT_PIN), (
|
||||||
#if CASE_LIGHT_MAX_PWM == 255
|
#if CASE_LIGHT_MAX_PWM == 255
|
||||||
n10ct
|
n10ct
|
||||||
#else
|
#else
|
||||||
map(n10ct, 0, 255, 0, CASE_LIGHT_MAX_PWM)
|
map(n10ct, 0, 255, 0, CASE_LIGHT_MAX_PWM)
|
||||||
#endif
|
#endif
|
||||||
);
|
));
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue