Move Stepper::synchronize to Planner (#10713)

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
Scott Lahteine
2018-05-12 01:38:02 -05:00
committed by GitHub
parent f2e3c9896e
commit 306f0f2135
33 changed files with 72 additions and 73 deletions

View File

@@ -79,7 +79,7 @@ inline void ocr_val_mode() {
void GcodeSuite::M3_M4(bool is_M3) {
stepper.synchronize(); // wait until previous movement commands (G0/G0/G2/G3) have completed before playing with the spindle
planner.synchronize(); // wait until previous movement commands (G0/G0/G2/G3) have completed before playing with the spindle
#if SPINDLE_DIR_CHANGE
const bool rotation_dir = (is_M3 != SPINDLE_INVERT_DIR);
if (SPINDLE_STOP_ON_DIR_CHANGE \
@@ -129,7 +129,7 @@ void GcodeSuite::M3_M4(bool is_M3) {
* M5 turn off spindle
*/
void GcodeSuite::M5() {
stepper.synchronize();
planner.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);