Mark axes not-homed with HOME_AFTER_DEACTIVATE (#18907)

This commit is contained in:
swissnorp
2020-08-27 23:05:53 +02:00
committed by GitHub
parent 462d3eeab1
commit a12ac5e175
20 changed files with 40 additions and 44 deletions

View File

@ -118,7 +118,7 @@
DEBUG_SECTION(log_G28, "home_z_safely", DEBUGGING(LEVELING));
// Disallow Z homing if X or Y homing is needed
if (axis_unhomed_error(_BV(X_AXIS) | _BV(Y_AXIS))) return;
if (homing_needed_error(_BV(X_AXIS) | _BV(Y_AXIS))) return;
sync_plan_position();
@ -299,8 +299,8 @@ void GcodeSuite::G28() {
#else // NOT DELTA
const bool homeZ = parser.seen('Z'),
needX = homeZ && TERN0(Z_SAFE_HOMING, axes_need_homing(_BV(X_AXIS))),
needY = homeZ && TERN0(Z_SAFE_HOMING, axes_need_homing(_BV(Y_AXIS))),
needX = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(X_AXIS))),
needY = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(Y_AXIS))),
homeX = needX || parser.seen('X'), homeY = needY || parser.seen('Y'),
home_all = homeX == homeY && homeX == homeZ, // All or None
doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;

View File

@ -584,7 +584,7 @@ void GcodeSuite::G425() {
TEMPORARY_SOFT_ENDSTOP_STATE(false);
TEMPORARY_BED_LEVELING_STATE(false);
if (axis_unhomed_error()) return;
if (homing_needed_error()) return;
measurements_t m;

View File

@ -55,7 +55,7 @@ extern const char SP_Y_STR[];
void GcodeSuite::M48() {
if (axis_unhomed_error()) return;
if (homing_needed_error()) return;
const int8_t verbose_level = parser.byteval('V', 1);
if (!WITHIN(verbose_level, 0, 4)) {