Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand corner leveling feature #16480

Closed
wants to merge 15 commits into from
6 changes: 5 additions & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,11 @@
//#define LEVEL_BED_CORNERS

#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
#define LEVEL_CORNERS_INSET 0 // (mm) An inset for all sides corner leveling if this value is larger then the individual sides it is used
#define LEVEL_CORNERS_INSET_LEFT 30 // (mm) An inset left for corner leveling
#define LEVEL_CORNERS_INSET_RIGHT 30 // (mm) An inset right for corner leveling
#define LEVEL_CORNERS_INSET_FRONT 30 // (mm) An inset front for corner leveling
#define LEVEL_CORNERS_INSET_BACK 30 // (mm) An inset back for corner leveling
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/lcd/menu/menu_bed_corners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ static inline void _lcd_goto_next_corner() {
line_to_z(LEVEL_CORNERS_Z_HOP);
switch (bed_corner) {
case 0:
current_position.set(X_MIN_BED + LEVEL_CORNERS_INSET, Y_MIN_BED + LEVEL_CORNERS_INSET);
current_position.set(X_MIN_BED + _MAX(LEVEL_CORNERS_INSET, LEVEL_CORNERS_INSET_LEFT), Y_MIN_BED + _MAX(LEVEL_CORNERS_INSET, LEVEL_CORNERS_INSET_FRONT));
break;
case 1:
current_position.x = X_MAX_BED - (LEVEL_CORNERS_INSET);
current_position.x = X_MAX_BED - (_MAX(LEVEL_CORNERS_INSET, LEVEL_CORNERS_INSET_RIGHT));
break;
case 2:
current_position.y = Y_MAX_BED - (LEVEL_CORNERS_INSET);
current_position.y = Y_MAX_BED - (_MAX(LEVEL_CORNERS_INSET, LEVEL_CORNERS_INSET_BACK));
break;
case 3:
current_position.x = X_MIN_BED + LEVEL_CORNERS_INSET;
current_position.x = X_MIN_BED + _MAX(LEVEL_CORNERS_INSET, LEVEL_CORNERS_INSET_LEFT);
break;
#if ENABLED(LEVEL_CENTER_TOO)
case 4:
Expand Down
6 changes: 5 additions & 1 deletion config/default/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,11 @@
//#define LEVEL_BED_CORNERS

#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
#define LEVEL_CORNERS_INSET 0 // (mm) An inset for all sides corner leveling if this value is larger then the individual sides it is used
#define LEVEL_CORNERS_INSET_LEFT 30 // (mm) An inset left for corner leveling
#define LEVEL_CORNERS_INSET_RIGHT 30 // (mm) An inset right for corner leveling
#define LEVEL_CORNERS_INSET_FRONT 30 // (mm) An inset front for corner leveling
#define LEVEL_CORNERS_INSET_BACK 30 // (mm) An inset back for corner leveling
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Alfawise/U20/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,11 @@
#define LEVEL_BED_CORNERS

#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
#define LEVEL_CORNERS_INSET 0 // (mm) An inset for all sides corner leveling if this value is larger then the individual sides it is used
#define LEVEL_CORNERS_INSET_LEFT 30 // (mm) An inset left for corner leveling
#define LEVEL_CORNERS_INSET_RIGHT 30 // (mm) An inset right for corner leveling
#define LEVEL_CORNERS_INSET_FRONT 30 // (mm) An inset front for corner leveling
#define LEVEL_CORNERS_INSET_BACK 30 // (mm) An inset back for corner leveling
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
#define LEVEL_CORNERS_HEIGHT 0.2 // (mm) Z height of nozzle at leveling points
#define LEVEL_CENTER_TOO // Move to the center after the last corner
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Creality/CR-10S/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,11 @@
#define LEVEL_BED_CORNERS

#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
#define LEVEL_CORNERS_INSET 0 // (mm) An inset for all sides corner leveling if this value is larger then the individual sides it is used
#define LEVEL_CORNERS_INSET_LEFT 30 // (mm) An inset left for corner leveling
#define LEVEL_CORNERS_INSET_RIGHT 30 // (mm) An inset right for corner leveling
#define LEVEL_CORNERS_INSET_FRONT 30 // (mm) An inset front for corner leveling
#define LEVEL_CORNERS_INSET_BACK 30 // (mm) An inset back for corner leveling
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
Expand Down
6 changes: 5 additions & 1 deletion config/examples/JGAurora/A5S/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,11 @@
#define LEVEL_BED_CORNERS

#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
#define LEVEL_CORNERS_INSET 0 // (mm) An inset for all sides corner leveling if this value is larger then the individual sides it is used
#define LEVEL_CORNERS_INSET_LEFT 30 // (mm) An inset left for corner leveling
#define LEVEL_CORNERS_INSET_RIGHT 30 // (mm) An inset right for corner leveling
#define LEVEL_CORNERS_INSET_FRONT 30 // (mm) An inset front for corner leveling
#define LEVEL_CORNERS_INSET_BACK 30 // (mm) An inset back for corner leveling
#define LEVEL_CORNERS_Z_HOP 5.0 // (mm) Move nozzle up before moving between corners
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
Expand Down