|
@ -7595,22 +7595,27 @@ inline void gcode_M907() { |
|
|
analogWrite(CASE_LIGHT_PIN, case_light_on != INVERT_CASE_LIGHT ? case_light_brightness : 0); |
|
|
analogWrite(CASE_LIGHT_PIN, case_light_on != INVERT_CASE_LIGHT ? case_light_brightness : 0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/**
|
|
|
#endif // HAS_CASE_LIGHT
|
|
|
* M355: Turn case lights on/off and set brightness |
|
|
|
|
|
* |
|
|
/**
|
|
|
* S<bool> Turn case light on or off |
|
|
* M355: Turn case lights on/off and set brightness |
|
|
* P<byte> Set case light brightness (PWM pin required) |
|
|
* |
|
|
*/ |
|
|
* S<bool> Turn case light on or off |
|
|
inline void gcode_M355() { |
|
|
* P<byte> Set case light brightness (PWM pin required) |
|
|
|
|
|
*/ |
|
|
|
|
|
inline void gcode_M355() { |
|
|
|
|
|
#if HAS_CASE_LIGHT |
|
|
if (code_seen('P')) case_light_brightness = code_value_byte(); |
|
|
if (code_seen('P')) case_light_brightness = code_value_byte(); |
|
|
if (code_seen('S')) case_light_on = code_value_bool(); |
|
|
if (code_seen('S')) case_light_on = code_value_bool(); |
|
|
update_case_light(); |
|
|
update_case_light(); |
|
|
SERIAL_ECHO_START; |
|
|
SERIAL_ECHO_START; |
|
|
SERIAL_ECHOPGM("Case lights "); |
|
|
SERIAL_ECHOPGM("Case lights "); |
|
|
case_light_on ? SERIAL_ECHOLNPGM("on") : SERIAL_ECHOLNPGM("off"); |
|
|
case_light_on ? SERIAL_ECHOLNPGM("on") : SERIAL_ECHOLNPGM("off"); |
|
|
} |
|
|
#else |
|
|
|
|
|
SERIAL_ERROR_START; |
|
|
#endif // HAS_CASE_LIGHT
|
|
|
SERIAL_ERRORLNPGM(MSG_ERR_M355_NONE); |
|
|
|
|
|
#endif // HAS_CASE_LIGHT
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#if ENABLED(MIXING_EXTRUDER) |
|
|
#if ENABLED(MIXING_EXTRUDER) |
|
|
|
|
|
|
|
@ -8751,13 +8756,9 @@ void process_next_command() { |
|
|
|
|
|
|
|
|
#endif // HAS_MICROSTEPS
|
|
|
#endif // HAS_MICROSTEPS
|
|
|
|
|
|
|
|
|
#if HAS_CASE_LIGHT |
|
|
case 355: // M355 Turn case lights on/off
|
|
|
|
|
|
gcode_M355(); |
|
|
case 355: // M355 Turn case lights on/off
|
|
|
break; |
|
|
gcode_M355(); |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
#endif // HAS_CASE_LIGHT
|
|
|
|
|
|
|
|
|
|
|
|
case 999: // M999: Restart after being Stopped
|
|
|
case 999: // M999: Restart after being Stopped
|
|
|
gcode_M999(); |
|
|
gcode_M999(); |
|
|