Merge pull request #4235 from thinkyhead/rc_revert_quickhome_test
Fix quick homing, tweak MIN_Z_HEIGHT_FOR_HOMING
This commit is contained in:
commit
9f42b1a075
@ -2914,11 +2914,14 @@ inline void gcode_G28() {
|
|||||||
|
|
||||||
#elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
|
#elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
|
||||||
|
|
||||||
// Raise Z before homing, if specified
|
// Raise Z before homing X or Y, if specified
|
||||||
destination[Z_AXIS] = (current_position[Z_AXIS] += MIN_Z_HEIGHT_FOR_HOMING);
|
if (home_all_axis || homeX || homeY) {
|
||||||
|
float z_dest = home_offset[Z_AXIS] + MIN_Z_HEIGHT_FOR_HOMING;
|
||||||
|
if (z_dest > current_position[Z_AXIS]) {
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) {
|
if (DEBUGGING(LEVELING)) {
|
||||||
SERIAL_ECHOPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
|
SERIAL_ECHOPAIR("Raise Z (before homing) to ", z_dest);
|
||||||
SERIAL_EOL;
|
SERIAL_EOL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -2926,29 +2929,28 @@ inline void gcode_G28() {
|
|||||||
feedrate = homing_feedrate[Z_AXIS];
|
feedrate = homing_feedrate[Z_AXIS];
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
do_blocking_move_to_z(destination[Z_AXIS]);
|
do_blocking_move_to_z(z_dest);
|
||||||
#else
|
#else
|
||||||
line_to_z(destination[Z_AXIS]);
|
line_to_z(z_dest);
|
||||||
stepper.synchronize();
|
stepper.synchronize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
destination[Z_AXIS] = current_position[Z_AXIS] = z_dest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // MIN_Z_HEIGHT_FOR_HOMING
|
#endif // MIN_Z_HEIGHT_FOR_HOMING
|
||||||
|
|
||||||
#if ENABLED(QUICK_HOME)
|
#if ENABLED(QUICK_HOME)
|
||||||
|
|
||||||
bool quick_homed = home_all_axis || (homeX && homeY);
|
if (home_all_axis || (homeX && homeY)) quick_home_xy();
|
||||||
if (quick_homed) quick_home_xy();
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
const bool quick_homed = false;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(HOME_Y_BEFORE_X)
|
#if ENABLED(HOME_Y_BEFORE_X)
|
||||||
|
|
||||||
// Home Y
|
// Home Y
|
||||||
if (!quick_homed && (home_all_axis || homeY)) {
|
if (home_all_axis || homeY) {
|
||||||
HOMEAXIS(Y);
|
HOMEAXIS(Y);
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position);
|
||||||
@ -2958,7 +2960,7 @@ inline void gcode_G28() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Home X
|
// Home X
|
||||||
if (!quick_homed && (home_all_axis || homeX)) {
|
if (home_all_axis || homeX) {
|
||||||
#if ENABLED(DUAL_X_CARRIAGE)
|
#if ENABLED(DUAL_X_CARRIAGE)
|
||||||
int tmp_extruder = active_extruder;
|
int tmp_extruder = active_extruder;
|
||||||
extruder_duplication_enabled = false;
|
extruder_duplication_enabled = false;
|
||||||
@ -2981,7 +2983,7 @@ inline void gcode_G28() {
|
|||||||
|
|
||||||
#if DISABLED(HOME_Y_BEFORE_X)
|
#if DISABLED(HOME_Y_BEFORE_X)
|
||||||
// Home Y
|
// Home Y
|
||||||
if (!quick_homed && (home_all_axis || homeY)) {
|
if (home_all_axis || homeY) {
|
||||||
HOMEAXIS(Y);
|
HOMEAXIS(Y);
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position);
|
if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position);
|
||||||
|
Loading…
Reference in New Issue
Block a user