From 3a5ac12321a2b92c8638d22b9cc141a66a1b0fa7 Mon Sep 17 00:00:00 2001 From: Fabio Viappiani Date: Sat, 27 Feb 2021 00:10:50 +0100 Subject: [PATCH] Fix M355 with NEOPIXEL (#21200) --- Marlin/src/gcode/feature/caselight/M355.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/feature/caselight/M355.cpp b/Marlin/src/gcode/feature/caselight/M355.cpp index 12ae5cff1..6634a90f4 100644 --- a/Marlin/src/gcode/feature/caselight/M355.cpp +++ b/Marlin/src/gcode/feature/caselight/M355.cpp @@ -60,12 +60,10 @@ void GcodeSuite::M355() { if (!caselight.on) SERIAL_ECHOLNPGM(STR_OFF); else { - #if CASELIGHT_USES_BRIGHTNESS - if (PWM_PIN(CASE_LIGHT_PIN)) { - SERIAL_ECHOLN(int(caselight.brightness)); - return; - } - #endif + if (TERN0(CASELIGHT_USES_BRIGHTNESS, TERN(CASE_LIGHT_USE_NEOPIXEL, true, PWM_PIN(CASE_LIGHT_PIN)))) { + SERIAL_ECHOLN(int(caselight.brightness)); + return; + } SERIAL_ECHOLNPGM(STR_ON); } }