Always do st_synchronize() before G28

This commit is contained in:
Scott Lahteine 2015-05-12 00:31:51 -07:00
parent 8a0dc4d54a
commit fa951f8a0b

View File

@ -1845,6 +1845,9 @@ inline void gcode_G4() {
*/ */
inline void gcode_G28() { inline void gcode_G28() {
// Wait for planner moves to finish!
st_synchronize();
// For auto bed leveling, clear the level matrix // For auto bed leveling, clear the level matrix
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
plan_bed_level_matrix.set_to_identity(); plan_bed_level_matrix.set_to_identity();
@ -1859,12 +1862,7 @@ inline void gcode_G28() {
mbl.active = 0; mbl.active = 0;
#endif #endif
saved_feedrate = feedrate; setup_for_endstop_move();
saved_feedrate_multiplier = feedrate_multiplier;
feedrate_multiplier = 100;
refresh_cmd_timeout();
enable_endstops(true);
set_destination_to_current(); set_destination_to_current();
@ -3150,8 +3148,6 @@ inline void gcode_M42() {
clean_up_after_endstop_move(); clean_up_after_endstop_move();
// enable_endstops(true);
if (verbose_level > 0) { if (verbose_level > 0) {
SERIAL_PROTOCOLPGM("Mean: "); SERIAL_PROTOCOLPGM("Mean: ");
SERIAL_PROTOCOL_F(mean, 6); SERIAL_PROTOCOL_F(mean, 6);