Add Z_AFTER_DEACTIVATE to account for gravity (#18906)
This commit is contained in:
committed by
Scott Lahteine
parent
e82e94be5b
commit
301569bee6
@ -819,16 +819,9 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) {
|
||||
}
|
||||
|
||||
if (countdown == 0 && (forceUpdate || position_changed()
|
||||
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
||||
|| blink_changed()
|
||||
#endif
|
||||
)) {
|
||||
draw_position(current_position, true
|
||||
#if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING)
|
||||
&& all_axes_known()
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|| TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())
|
||||
))
|
||||
draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, all_axes_known()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1281,7 +1281,7 @@ void Planner::recalculate() {
|
||||
void Planner::check_axes_activity() {
|
||||
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
|
||||
xyze_bool_t axis_active = { false };
|
||||
xyze_bool_t axis_active = { true, true, true, true };
|
||||
#endif
|
||||
|
||||
#if HAS_FAN
|
||||
@ -1316,7 +1316,10 @@ void Planner::check_axes_activity() {
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E)
|
||||
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
|
||||
block_t *block = &block_buffer[b];
|
||||
LOOP_XYZE(i) if (block->steps[i]) axis_active[i] = true;
|
||||
if (ENABLED(DISABLE_X) && block->steps[X_AXIS]) axis_active[X_AXIS] = true;
|
||||
if (ENABLED(DISABLE_Y) && block->steps[Y_AXIS]) axis_active[Y_AXIS] = true;
|
||||
if (ENABLED(DISABLE_Z) && block->steps[Z_AXIS]) axis_active[Z_AXIS] = true;
|
||||
if (ENABLED(DISABLE_E) && block->steps[E_AXIS]) axis_active[E_AXIS] = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -848,7 +848,13 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
||||
#define DISABLE_AXIS_Y() do{ DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); CBI(axis_known_position, Y_AXIS); }while(0)
|
||||
|
||||
#define ENABLE_AXIS_Z() do{ ENABLE_STEPPER_Z(); ENABLE_STEPPER_Z2(); ENABLE_STEPPER_Z3(); ENABLE_STEPPER_Z4(); }while(0)
|
||||
#define DISABLE_AXIS_Z() do{ DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); CBI(axis_known_position, Z_AXIS); }while(0)
|
||||
|
||||
#ifdef Z_AFTER_DEACTIVATE
|
||||
#define Z_RESET() do{ current_position.z = Z_AFTER_DEACTIVATE; planner.sync_plan_position(); }while(0)
|
||||
#else
|
||||
#define Z_RESET()
|
||||
#endif
|
||||
#define DISABLE_AXIS_Z() do{ DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); CBI(axis_known_position, Z_AXIS); Z_RESET(); }while(0)
|
||||
|
||||
//
|
||||
// Extruder steppers enable / disable macros
|
||||
|
Reference in New Issue
Block a user