Apply TERN to compact code (#17619)
This commit is contained in:
@@ -68,15 +68,9 @@ void LEDLights::setup() {
|
||||
if (PWM_PIN(RGB_LED_W_PIN)) SET_PWM(RGB_LED_W_PIN); else SET_OUTPUT(RGB_LED_W_PIN);
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
neo.init();
|
||||
#endif
|
||||
#if ENABLED(PCA9533)
|
||||
PCA9533_init();
|
||||
#endif
|
||||
#if ENABLED(LED_USER_PRESET_STARTUP)
|
||||
set_default();
|
||||
#endif
|
||||
TERN_(NEOPIXEL_LED, neo.init());
|
||||
TERN_(PCA9533, PCA9533_init());
|
||||
TERN_(LED_USER_PRESET_STARTUP, set_default());
|
||||
}
|
||||
|
||||
void LEDLights::set_color(const LEDColor &incol
|
||||
@@ -140,9 +134,7 @@ void LEDLights::set_color(const LEDColor &incol
|
||||
pca9632_set_led_color(incol);
|
||||
#endif
|
||||
|
||||
#if ENABLED(PCA9533)
|
||||
PCA9533_setColor(incol.r, incol.g, incol.b);
|
||||
#endif
|
||||
TERN_(PCA9533, PCA9533_setColor(incol.r, incol.g, incol.b));
|
||||
|
||||
#if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS)
|
||||
// Don't update the color when OFF
|
||||
|
||||
Reference in New Issue
Block a user