Add loose soft endstop state, apply to UBL fine-tune (#19681)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f5139f8bf4
commit
193c0a52d9
@@ -57,28 +57,9 @@
|
||||
static void _lcd_move_xyz(PGM_P const name, const AxisEnum axis) {
|
||||
if (ui.use_click()) return ui.goto_previous_screen_no_defer();
|
||||
if (ui.encoderPosition && !ui.manual_move.processing) {
|
||||
|
||||
// Start with no limits to movement
|
||||
float min = current_position[axis] - 1000,
|
||||
max = current_position[axis] + 1000;
|
||||
|
||||
// Limit to software endstops, if enabled
|
||||
#if HAS_SOFTWARE_ENDSTOPS
|
||||
if (soft_endstops_enabled) switch (axis) {
|
||||
case X_AXIS:
|
||||
TERN_(MIN_SOFTWARE_ENDSTOP_X, min = soft_endstop.min.x);
|
||||
TERN_(MAX_SOFTWARE_ENDSTOP_X, max = soft_endstop.max.x);
|
||||
break;
|
||||
case Y_AXIS:
|
||||
TERN_(MIN_SOFTWARE_ENDSTOP_Y, min = soft_endstop.min.y);
|
||||
TERN_(MAX_SOFTWARE_ENDSTOP_Y, max = soft_endstop.max.y);
|
||||
break;
|
||||
case Z_AXIS:
|
||||
TERN_(MIN_SOFTWARE_ENDSTOP_Z, min = soft_endstop.min.z);
|
||||
TERN_(MAX_SOFTWARE_ENDSTOP_Z, max = soft_endstop.max.z);
|
||||
default: break;
|
||||
}
|
||||
#endif // HAS_SOFTWARE_ENDSTOPS
|
||||
// Get motion limit from software endstops, if any
|
||||
float min, max;
|
||||
soft_endstop.get_manual_axis_limits(axis, min, max);
|
||||
|
||||
// Delta limits XY based on the current offset from center
|
||||
// This assumes the center is 0,0
|
||||
@@ -238,7 +219,7 @@ void menu_move() {
|
||||
BACK_ITEM(MSG_MOTION);
|
||||
|
||||
#if BOTH(HAS_SOFTWARE_ENDSTOPS, SOFT_ENDSTOPS_MENU_ITEM)
|
||||
EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled);
|
||||
EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstop._enabled);
|
||||
#endif
|
||||
|
||||
if (NONE(IS_KINEMATIC, NO_MOTION_BEFORE_HOMING) || all_axes_homed()) {
|
||||
|
||||
Reference in New Issue
Block a user