diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index c086287991..0adff080dd 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -357,9 +357,9 @@ static void lcd_move_x() if (encoderPosition != 0) { current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale; - if (current_position[X_AXIS] < X_MIN_POS) + if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS) current_position[X_AXIS] = X_MIN_POS; - if (current_position[X_AXIS] > X_MAX_POS) + if (max_software_endstops && current_position[X_AXIS] > X_MAX_POS) current_position[X_AXIS] = X_MAX_POS; encoderPosition = 0; plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder); @@ -381,9 +381,9 @@ static void lcd_move_y() if (encoderPosition != 0) { current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale; - if (current_position[Y_AXIS] < Y_MIN_POS) + if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS) current_position[Y_AXIS] = Y_MIN_POS; - if (current_position[Y_AXIS] > Y_MAX_POS) + if (max_software_endstops && current_position[Y_AXIS] > Y_MAX_POS) current_position[Y_AXIS] = Y_MAX_POS; encoderPosition = 0; plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 600, active_extruder); @@ -405,9 +405,9 @@ static void lcd_move_z() if (encoderPosition != 0) { current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale; - if (current_position[Z_AXIS] < Z_MIN_POS) + if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS) current_position[Z_AXIS] = Z_MIN_POS; - if (current_position[Z_AXIS] > Z_MAX_POS) + if (max_software_endstops && current_position[Z_AXIS] > Z_MAX_POS) current_position[Z_AXIS] = Z_MAX_POS; encoderPosition = 0; plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 60, active_extruder);