Minor patch ups to `G29`

This may fix a subtle bug caused by doing `G29` more than once without
`G28` between.
2.0.x
Scott Lahteine 9 years ago
parent cba2698871
commit a644ab1de4

@ -1351,7 +1351,7 @@ static void setup_for_endstop_move() {
//bedLevel.debug("bedLevel");
//plan_bed_level_matrix.debug("bed level before");
//vector_3 uncorrected_position = plan_get_position_mm();
//vector_3 uncorrected_position = plan_get_position();
//uncorrected_position.debug("position before");
vector_3 corrected_position = plan_get_position();
@ -3039,26 +3039,20 @@ inline void gcode_G28() {
#endif // AUTO_BED_LEVELING_GRID
#if ENABLED(Z_PROBE_SLED)
dock_sled(false); // engage (un-dock) the Z probe
#elif ENABLED(Z_PROBE_ALLEN_KEY) || (ENABLED(DELTA) && SERVO_LEVELING)
deploy_z_probe();
#endif
st_synchronize();
if (!dryrun) {
// make sure the bed_level_rotation_matrix is identity or the planner will get it wrong
plan_bed_level_matrix.set_to_identity();
#if ENABLED(DELTA)
reset_bed_level();
#else //!DELTA
//vector_3 corrected_position = plan_get_position_mm();
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("BEFORE matrix.set_to_identity", current_position);
#endif
//vector_3 corrected_position = plan_get_position();
//corrected_position.debug("position before G29");
vector_3 uncorrected_position = plan_get_position();
//uncorrected_position.debug("position during G29");
@ -3074,6 +3068,14 @@ inline void gcode_G28() {
#endif // !DELTA
}
#if ENABLED(Z_PROBE_SLED)
dock_sled(false); // engage (un-dock) the Z probe
#elif ENABLED(Z_PROBE_ALLEN_KEY) || (ENABLED(DELTA) && SERVO_LEVELING)
deploy_z_probe();
#endif
st_synchronize();
setup_for_endstop_move();
feedrate = homing_feedrate[Z_AXIS];

Loading…
Cancel
Save