Skip to content
Snippets Groups Projects
Commit 67529569 authored by ManuelMcLure's avatar ManuelMcLure Committed by Scott Lahteine
Browse files

Fix unused var warning (#16467)

parent d1e55a2d
Branches
Tags
No related merge requests found
......@@ -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
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment