|
@@ -58,7 +58,9 @@ void update_case_light() {
|
58
|
58
|
if (case_light_arg_flag && case_light_on)
|
59
|
59
|
case_light_brightness = case_light_brightness_sav; // restore last brightens if this is an S1 argument
|
60
|
60
|
|
61
|
|
- const uint8_t i = case_light_on ? case_light_brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i;
|
|
61
|
+ #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) || NONE(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_NO_BRIGHTNESS)
|
|
62
|
+ const uint8_t i = case_light_on ? case_light_brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i;
|
|
63
|
+ #endif
|
62
|
64
|
|
63
|
65
|
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
64
|
66
|
|
|
@@ -71,13 +73,13 @@ void update_case_light() {
|
71
|
73
|
|
72
|
74
|
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
|
73
|
75
|
if (PWM_PIN(CASE_LIGHT_PIN))
|
74
|
|
- analogWrite(pin_t(CASE_LIGHT_PIN),
|
|
76
|
+ analogWrite(pin_t(CASE_LIGHT_PIN), (
|
75
|
77
|
#if CASE_LIGHT_MAX_PWM == 255
|
76
|
78
|
n10ct
|
77
|
79
|
#else
|
78
|
80
|
map(n10ct, 0, 255, 0, CASE_LIGHT_MAX_PWM)
|
79
|
81
|
#endif
|
80
|
|
- );
|
|
82
|
+ ));
|
81
|
83
|
else
|
82
|
84
|
#endif
|
83
|
85
|
{
|