Fix unused var warning (#16467)

This commit is contained in:
ManuelMcLure 2020-01-05 00:52:38 -08:00 committed by Scott Lahteine
parent d1e55a2d1d
commit 675295692b

View file

@ -58,7 +58,9 @@ void update_case_light() {
if (case_light_arg_flag && case_light_on)
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)
@ -71,13 +73,13 @@ void update_case_light() {
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
if (PWM_PIN(CASE_LIGHT_PIN))
analogWrite(pin_t(CASE_LIGHT_PIN),
analogWrite(pin_t(CASE_LIGHT_PIN), (
#if CASE_LIGHT_MAX_PWM == 255
n10ct
#else
map(n10ct, 0, 255, 0, CASE_LIGHT_MAX_PWM)
#endif
);
));
else
#endif
{