|
@@ -26,22 +26,20 @@
|
26
|
26
|
|
27
|
27
|
#if HAS_CASE_LIGHT
|
28
|
28
|
#include "../../../feature/caselight.h"
|
29
|
|
-#endif
|
30
|
29
|
|
31
|
|
-/**
|
32
|
|
- * M355: Turn case light on/off and set brightness
|
33
|
|
- *
|
34
|
|
- * P<byte> Set case light brightness (PWM pin required - ignored otherwise)
|
35
|
|
- *
|
36
|
|
- * S<bool> Set case light on/off
|
37
|
|
- *
|
38
|
|
- * When S turns on the light on a PWM pin then the current brightness level is used/restored
|
39
|
|
- *
|
40
|
|
- * M355 P200 S0 turns off the light & sets the brightness level
|
41
|
|
- * M355 S1 turns on the light with a brightness of 200 (assuming a PWM pin)
|
42
|
|
- */
|
43
|
|
-void GcodeSuite::M355() {
|
44
|
|
- #if HAS_CASE_LIGHT
|
|
30
|
+ /**
|
|
31
|
+ * M355: Turn case light on/off and set brightness
|
|
32
|
+ *
|
|
33
|
+ * P<byte> Set case light brightness (PWM pin required - ignored otherwise)
|
|
34
|
+ *
|
|
35
|
+ * S<bool> Set case light on/off
|
|
36
|
+ *
|
|
37
|
+ * When S turns on the light on a PWM pin then the current brightness level is used/restored
|
|
38
|
+ *
|
|
39
|
+ * M355 P200 S0 turns off the light & sets the brightness level
|
|
40
|
+ * M355 S1 turns on the light with a brightness of 200 (assuming a PWM pin)
|
|
41
|
+ */
|
|
42
|
+ void GcodeSuite::M355() {
|
45
|
43
|
uint8_t args = 0;
|
46
|
44
|
if (parser.seenval('P')) {
|
47
|
45
|
++args, case_light_brightness = parser.value_byte();
|
|
@@ -62,7 +60,5 @@ void GcodeSuite::M355() {
|
62
|
60
|
if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLNPGM("Case light: on");
|
63
|
61
|
else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness);
|
64
|
62
|
}
|
65
|
|
- #else
|
66
|
|
- SERIAL_ERROR_MSG(MSG_ERR_M355_NONE);
|
67
|
|
- #endif
|
68
|
|
-}
|
|
63
|
+ }
|
|
64
|
+#endif // HAS_CASE_LIGHT
|