Merge pull request #9081 from thinkyhead/bf1_patch_m5

[1.1.x] Set laser/spindle PWM to lowest speed on M5
This commit is contained in:
Scott Lahteine 2018-01-06 15:29:51 -06:00 committed by GitHub
commit f2fd9ab1b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6283,6 +6283,9 @@ inline void gcode_G92() {
inline void gcode_M5() {
stepper.synchronize();
WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT);
#if ENABLED(SPINDLE_LASER_PWM)
analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);
#endif
delay_for_power_down();
}