|
@@ -7595,22 +7595,27 @@ inline void gcode_M907() {
|
7595
|
7595
|
analogWrite(CASE_LIGHT_PIN, case_light_on != INVERT_CASE_LIGHT ? case_light_brightness : 0);
|
7596
|
7596
|
}
|
7597
|
7597
|
|
7598
|
|
- /**
|
7599
|
|
- * M355: Turn case lights on/off and set brightness
|
7600
|
|
- *
|
7601
|
|
- * S<bool> Turn case light on or off
|
7602
|
|
- * P<byte> Set case light brightness (PWM pin required)
|
7603
|
|
- */
|
7604
|
|
- inline void gcode_M355() {
|
|
7598
|
+#endif // HAS_CASE_LIGHT
|
|
7599
|
+
|
|
7600
|
+/**
|
|
7601
|
+ * M355: Turn case lights on/off and set brightness
|
|
7602
|
+ *
|
|
7603
|
+ * S<bool> Turn case light on or off
|
|
7604
|
+ * P<byte> Set case light brightness (PWM pin required)
|
|
7605
|
+ */
|
|
7606
|
+inline void gcode_M355() {
|
|
7607
|
+ #if HAS_CASE_LIGHT
|
7605
|
7608
|
if (code_seen('P')) case_light_brightness = code_value_byte();
|
7606
|
7609
|
if (code_seen('S')) case_light_on = code_value_bool();
|
7607
|
7610
|
update_case_light();
|
7608
|
7611
|
SERIAL_ECHO_START;
|
7609
|
7612
|
SERIAL_ECHOPGM("Case lights ");
|
7610
|
7613
|
case_light_on ? SERIAL_ECHOLNPGM("on") : SERIAL_ECHOLNPGM("off");
|
7611
|
|
- }
|
7612
|
|
-
|
7613
|
|
-#endif // HAS_CASE_LIGHT
|
|
7614
|
+ #else
|
|
7615
|
+ SERIAL_ERROR_START;
|
|
7616
|
+ SERIAL_ERRORLNPGM(MSG_ERR_M355_NONE);
|
|
7617
|
+ #endif // HAS_CASE_LIGHT
|
|
7618
|
+}
|
7614
|
7619
|
|
7615
|
7620
|
#if ENABLED(MIXING_EXTRUDER)
|
7616
|
7621
|
|
|
@@ -8751,13 +8756,9 @@ void process_next_command() {
|
8751
|
8756
|
|
8752
|
8757
|
#endif // HAS_MICROSTEPS
|
8753
|
8758
|
|
8754
|
|
- #if HAS_CASE_LIGHT
|
8755
|
|
-
|
8756
|
|
- case 355: // M355 Turn case lights on/off
|
8757
|
|
- gcode_M355();
|
8758
|
|
- break;
|
8759
|
|
-
|
8760
|
|
- #endif // HAS_CASE_LIGHT
|
|
8759
|
+ case 355: // M355 Turn case lights on/off
|
|
8760
|
+ gcode_M355();
|
|
8761
|
+ break;
|
8761
|
8762
|
|
8762
|
8763
|
case 999: // M999: Restart after being Stopped
|
8763
|
8764
|
gcode_M999();
|