Move Stepper::synchronize to Planner (#10713)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
@ -50,7 +50,7 @@ void GcodeSuite::M18_M84() {
|
||||
stepper.finish_and_disable();
|
||||
}
|
||||
else {
|
||||
stepper.synchronize();
|
||||
planner.synchronize();
|
||||
if (parser.seen('X')) disable_X();
|
||||
if (parser.seen('Y')) disable_Y();
|
||||
if (parser.seen('Z')) disable_Z();
|
||||
|
@ -37,7 +37,7 @@ void GcodeSuite::M226() {
|
||||
|
||||
int target = LOW;
|
||||
|
||||
stepper.synchronize();
|
||||
planner.synchronize();
|
||||
|
||||
pinMode(pin, INPUT);
|
||||
switch (pin_state) {
|
||||
|
@ -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);
|
||||
|
@ -28,6 +28,6 @@
|
||||
*/
|
||||
void GcodeSuite::M400() {
|
||||
|
||||
stepper.synchronize();
|
||||
planner.synchronize();
|
||||
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
* Note: the X axis should be homed after changing dual x-carriage mode.
|
||||
*/
|
||||
void GcodeSuite::M605() {
|
||||
stepper.synchronize();
|
||||
planner.synchronize();
|
||||
if (parser.seen('S')) dual_x_carriage_mode = (DualXMode)parser.value_byte();
|
||||
switch (dual_x_carriage_mode) {
|
||||
case DXC_FULL_CONTROL_MODE:
|
||||
@ -75,7 +75,7 @@
|
||||
#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
||||
|
||||
void GcodeSuite::M605() {
|
||||
stepper.synchronize();
|
||||
planner.synchronize();
|
||||
extruder_duplication_enabled = parser.intval('S') == (int)DXC_DUPLICATION_MODE;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
|
||||
|
Reference in New Issue
Block a user