Browse Source

Fix M355 with NEOPIXEL (#21200)

Fabio Viappiani 4 years ago
parent
commit
e27fba0c06
No account linked to committer's email address
1 changed files with 4 additions and 6 deletions
  1. 4
    6
      Marlin/src/gcode/feature/caselight/M355.cpp

+ 4
- 6
Marlin/src/gcode/feature/caselight/M355.cpp View File

@@ -60,12 +60,10 @@ void GcodeSuite::M355() {
60 60
   if (!caselight.on)
61 61
     SERIAL_ECHOLNPGM(STR_OFF);
62 62
   else {
63
-    #if CASELIGHT_USES_BRIGHTNESS
64
-      if (PWM_PIN(CASE_LIGHT_PIN)) {
65
-        SERIAL_ECHOLN(int(caselight.brightness));
66
-        return;
67
-      }
68
-    #endif
63
+    if (TERN0(CASELIGHT_USES_BRIGHTNESS, TERN(CASE_LIGHT_USE_NEOPIXEL, true, PWM_PIN(CASE_LIGHT_PIN)))) {
64
+      SERIAL_ECHOLN(int(caselight.brightness));
65
+      return;
66
+    }
69 67
     SERIAL_ECHOLNPGM(STR_ON);
70 68
   }
71 69
 }

Loading…
Cancel
Save