diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 79e42e9606f..f5366e45e2e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 8704d781d16..a5a60e2dd10 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -271,7 +271,7 @@ #include "power.h" #endif -#if HAS_ABL +#if ABL_PLANAR #include "vector_3.h" #if ENABLED(AUTO_BED_LEVELING_LINEAR) #include "least_squares_fit.h" @@ -773,12 +773,6 @@ void report_current_position_detail(); print_xyz(prefix, suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]); } - #if HAS_ABL - void print_xyz(const char* prefix, const char* suffix, const vector_3 &xyz) { - print_xyz(prefix, suffix, xyz.x, xyz.y, xyz.z); - } - #endif - #define DEBUG_POS(SUFFIX,VAR) do { \ print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0) #endif diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 3c2328756d7..ac7d3bb964f 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -894,8 +894,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #if ENABLED(LCD_BED_LEVELING) #if DISABLED(ULTIPANEL) #error "LCD_BED_LEVELING requires an LCD controller." - #elif !(ENABLED(MESH_BED_LEVELING) || (OLDSCHOOL_ABL && ENABLED(PROBE_MANUALLY))) - #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or ABL with PROBE_MANUALLY." + #elif !(ENABLED(MESH_BED_LEVELING) || OLDSCHOOL_ABL) + #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING." #endif #endif diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 98434108071..864ebcdd969 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -1050,8 +1050,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index f34b8ea8188..de8e43eda19 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 87aa6620384..f7045f4ec49 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -1168,8 +1168,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index 17ae5dc7884..d79bc54f6cb 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -1048,8 +1048,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index 0af47205e8a..f029b94cb04 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index 67f22584041..1a5635bffd7 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index 38fb44c079a..869c16bde1c 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -1018,8 +1018,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index 6e82002fcb9..a540af9bfa0 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -1042,8 +1042,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index aa0c76d8be9..4241fa826c3 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -1018,8 +1018,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index e722be0d02b..4634c5d69d0 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1029,8 +1029,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index fcc879b5869..a47e1bdb4d9 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -1040,8 +1040,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index f2d4a5b7739..198cd8a72af 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -1031,8 +1031,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ #define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index a36af1840fd..5a4de898934 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -1049,8 +1049,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index 3c421b96abe..90234de3345 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -1036,8 +1036,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ #define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index fa6681693b3..b07b1f954ca 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -1034,8 +1034,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index 3d36c0d9f8f..42811e6f09f 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -1040,8 +1040,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ #define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 7dbb702e8d0..d3cb110614d 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1012,8 +1012,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index b902fbcb84a..22814cf1f1d 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1012,8 +1012,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index c8525ce4732..00f0a9f996c 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -1054,8 +1054,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index fbf831acae6..26cfce4e2f9 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -1045,8 +1045,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index 473e9419e13..b4068d32504 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index f24dd9a858d..9ab37900170 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -1046,8 +1046,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 3fdd54f76eb..13a536697fb 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -1045,8 +1045,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ #define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index c8994704d1f..bce15ea7d25 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -1034,8 +1034,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index e04a8ccc381..977b864aef9 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -1041,8 +1041,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ #define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index 814241157b7..514accf941e 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -1069,8 +1069,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index 181b9310b1b..eb3ad80417b 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -1034,8 +1034,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ #define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index 2262b020d8b..4589eee355c 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -1034,8 +1034,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index e0ec7238e8e..4cd41a08153 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -1076,8 +1076,8 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 99960dc9f6a..c3f372662aa 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 080f182b86d..650c5105ac4 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1028,8 +1028,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 3bd13e696df..dbd37d9536a 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1042,8 +1042,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 20da8d95236..c1d7fd74fb2 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -1061,8 +1061,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 9cfb8e38e20..69c756e3272 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1086,8 +1086,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 81b7604c47f..61168b9d83e 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index 9949638febc..80f2eb73a34 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index 67c8b53e5b8..1d0093d97b7 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -1041,8 +1041,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 255cb916941..b6209498a68 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -1060,8 +1060,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index 71656de832d..9d4aaa9689c 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index de08b23736f..9992f9a7631 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index 98eaddd67fe..6605b8b101c 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -1037,8 +1037,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 1050fd9c17a..5c6a0b26d6d 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1030,8 +1030,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index a0ed018c4ba..0cba28a2b8e 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -1181,8 +1181,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index ab5c45f28a0..8fa5a644408 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -1163,8 +1163,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 2af8da8e6de..ae40c1918a9 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -1162,8 +1162,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 629ac4fa37f..b6264a0678a 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -1176,8 +1176,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 4b4511c8df9..4ef6e268673 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1150,8 +1150,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 9eab7f53c99..797e5d837ce 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1153,8 +1153,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index cbdbc07c94e..8b143d1770e 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1144,8 +1144,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index ce878d8def4..f7ffcddc3a0 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1153,8 +1153,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index 66377063ca0..8b1d5648bb7 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -1051,8 +1051,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 8c4d302ba7e..f6e1f7afc3e 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1033,8 +1033,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 029f3984410..e13cdea13b5 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1025,8 +1025,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 6c50a896281..d26c5220f0d 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -1035,8 +1035,8 @@ #endif /** - * Use the LCD controller for bed leveling - * Requires MESH_BED_LEVELING or PROBE_MANUALLY + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. */ //#define LCD_BED_LEVELING diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 3654e704fcb..50fef84cae5 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -769,7 +769,7 @@ #define MSG_FIRST _UxGT("first") #endif #ifndef MSG_ZPROBE_ZOFFSET - #define MSG_ZPROBE_ZOFFSET _UxGT("Z Offset") + #define MSG_ZPROBE_ZOFFSET _UxGT("Probe Z Offset") #endif #ifndef MSG_BABYSTEP_X #define MSG_BABYSTEP_X _UxGT("Babystep X") diff --git a/Marlin/planner.h b/Marlin/planner.h index 61af55fc816..af845600a54 100644 --- a/Marlin/planner.h +++ b/Marlin/planner.h @@ -36,7 +36,7 @@ #include "enum.h" #include "Marlin.h" -#if HAS_ABL +#if ABL_PLANAR #include "vector_3.h" #endif diff --git a/Marlin/ubl.h b/Marlin/ubl.h index 90d6cd26a74..5a401df2f8a 100644 --- a/Marlin/ubl.h +++ b/Marlin/ubl.h @@ -30,7 +30,6 @@ #include "Marlin.h" #include "planner.h" #include "math.h" -#include "vector_3.h" #include "configuration_store.h" #define UBL_VERSION "1.01" diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 3acd867e6b3..d28edc161be 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -1491,6 +1491,8 @@ #if HAS_BED_PROBE + #include "vector_3.h" + void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) { constexpr int16_t x_min = max(MIN_PROBE_X, MESH_MIN_X), x_max = min(MAX_PROBE_X, MESH_MAX_X), diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 5dfbb192f4a..9827b8bc945 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -129,11 +129,11 @@ uint16_t max_display_update_time = 0; DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(int16_t, int3, itostr3); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint8_t, int8, i8tostr3); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float3, ftostr3); - DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float32, ftostr32); + DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52, ftostr52); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float43, ftostr43sign); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float5, ftostr5rj); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float51, ftostr51sign); - DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52, ftostr52sign); + DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52sign, ftostr52sign); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float62, ftostr62rj); DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint32_t, long5, ftostr5rj); #define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) DRAW_BOOL_SETTING(sel, row, pstr, data) @@ -253,11 +253,11 @@ uint16_t max_display_update_time = 0; DECLARE_MENU_EDIT_TYPE(int16_t, int3); DECLARE_MENU_EDIT_TYPE(uint8_t, int8); DECLARE_MENU_EDIT_TYPE(float, float3); - DECLARE_MENU_EDIT_TYPE(float, float32); + DECLARE_MENU_EDIT_TYPE(float, float52); DECLARE_MENU_EDIT_TYPE(float, float43); DECLARE_MENU_EDIT_TYPE(float, float5); DECLARE_MENU_EDIT_TYPE(float, float51); - DECLARE_MENU_EDIT_TYPE(float, float52); + DECLARE_MENU_EDIT_TYPE(float, float52sign); DECLARE_MENU_EDIT_TYPE(float, float62); DECLARE_MENU_EDIT_TYPE(uint32_t, long5); @@ -1395,13 +1395,20 @@ void lcd_quick_feedback(const bool clear_buttons) { // MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999); + // // Manual bed leveling, Bed Z: + // #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING) MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); #endif - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + + // + // Leveling Fade Height + // + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(SLIM_LCD_MENUS) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); #endif + // // Nozzle: // Nozzle [1-4]: @@ -1874,7 +1881,7 @@ void lcd_quick_feedback(const bool clear_buttons) { #endif // LEVEL_BED_CORNERS - #if ENABLED(LCD_BED_LEVELING) + #if ENABLED(LCD_BED_LEVELING) && (ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING)) /** * @@ -2036,76 +2043,6 @@ void lcd_quick_feedback(const bool clear_buttons) { enqueue_and_echo_commands_P(PSTR("G28")); } - static bool new_level_state; - void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(new_level_state); } - - /** - * Step 1: Bed Level entry-point - * - * << Prepare - * Auto Home (if homing needed) - * Leveling On/Off (if data exists, and homed) - * Fade Height: --- (Req: ENABLE_LEVELING_FADE_HEIGHT) - * Mesh Z Offset: --- (Req: MESH_BED_LEVELING) - * Z Probe Offset: --- (Req: HAS_BED_PROBE, Opt: BABYSTEP_ZPROBE_OFFSET) - * Level Bed > - * Level Corners > (if homed) - * Load Settings (Req: EEPROM_SETTINGS) - * Save Settings (Req: EEPROM_SETTINGS) - */ - void lcd_bed_leveling() { - START_MENU(); - MENU_BACK(MSG_PREPARE); - - #if DISABLED(MESH_BED_LEVELING) - if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS])) - MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); - else - #endif - if (leveling_is_valid()) { - new_level_state = planner.leveling_active; - MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling); - } - - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); - #endif - - // - // MBL Z Offset - // - #if ENABLED(MESH_BED_LEVELING) - MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); - #endif - - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); - #elif HAS_BED_PROBE - MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); - #endif - - MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue); - - #if ENABLED(LEVEL_BED_CORNERS) - // Move to the next corner for leveling - if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) - MENU_ITEM(submenu, MSG_LEVEL_CORNERS, _lcd_level_bed_corners); - #endif - - #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); - MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); - #endif - END_MENU(); - } - - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - void _lcd_goto_bed_leveling() { - lcd_goto_screen(lcd_bed_leveling); - new_z_fade_height = planner.z_fade_height; - } - #endif - #elif ENABLED(AUTO_BED_LEVELING_UBL) void _lcd_ubl_level_bed(); @@ -2637,6 +2574,93 @@ void lcd_quick_feedback(const bool clear_buttons) { #endif // AUTO_BED_LEVELING_UBL + + #if ENABLED(LCD_BED_LEVELING) || (PLANNER_LEVELING && DISABLED(SLIM_LCD_MENUS)) + void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(!planner.leveling_active); } + #endif + + #if ENABLED(LCD_BED_LEVELING) + + /** + * Step 1: Bed Level entry-point + * + * << Prepare + * Auto Home (if homing needed) + * Leveling On/Off (if data exists, and homed) + * Fade Height: --- (Req: ENABLE_LEVELING_FADE_HEIGHT) + * Mesh Z Offset: --- (Req: MESH_BED_LEVELING) + * Z Probe Offset: --- (Req: HAS_BED_PROBE, Opt: BABYSTEP_ZPROBE_OFFSET) + * Level Bed > + * Level Corners > (if homed) + * Load Settings (Req: EEPROM_SETTINGS) + * Save Settings (Req: EEPROM_SETTINGS) + */ + void lcd_bed_leveling() { + START_MENU(); + MENU_BACK(MSG_PREPARE); + + const bool is_homed = axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]; + + // Auto Home if not using manual probing + #if DISABLED(PROBE_MANUALLY) && DISABLED(MESH_BED_LEVELING) + if (!is_homed) MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); + #endif + + // Level Bed + #if ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING) + // Manual leveling uses a guided procedure + MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue); + #else + // Automatic leveling can just run the G-code + MENU_ITEM(gcode, MSG_LEVEL_BED, is_homed ? PSTR("G29") : PSTR("G28\nG29")); + #endif + + // Homed and leveling is valid? Then leveling can be toggled. + if (is_homed && leveling_is_valid()) { + bool new_level_state = planner.leveling_active; + MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling); + } + + // Z Fade Height + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); + #endif + + // + // MBL Z Offset + // + #if ENABLED(MESH_BED_LEVELING) + MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); + #endif + + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); + #elif HAS_BED_PROBE + MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); + #endif + + #if ENABLED(LEVEL_BED_CORNERS) + // Move to the next corner for leveling + if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) + MENU_ITEM(submenu, MSG_LEVEL_CORNERS, _lcd_level_bed_corners); + #endif + + #if ENABLED(EEPROM_SETTINGS) + MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); + MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); + #endif + END_MENU(); + } + + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + void _lcd_goto_bed_leveling() { + lcd_goto_screen(lcd_bed_leveling); + new_z_fade_height = planner.z_fade_height; + } + #endif + + #endif // LCD_BED_LEVELING + /** * * "Prepare" submenu @@ -2673,26 +2697,44 @@ void lcd_quick_feedback(const bool clear_buttons) { // Level Bed // #if ENABLED(AUTO_BED_LEVELING_UBL) - MENU_ITEM(submenu, MSG_UBL_LEVEL_BED, - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - _lcd_goto_ubl_level_bed - #else - _lcd_ubl_level_bed - #endif + + MENU_ITEM(submenu, MSG_UBL_LEVEL_BED, ( + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + _lcd_goto_ubl_level_bed + #else + _lcd_ubl_level_bed + #endif + ) ); + #elif ENABLED(LCD_BED_LEVELING) + #if ENABLED(PROBE_MANUALLY) if (!g29_in_progress) #endif - MENU_ITEM(submenu, MSG_BED_LEVELING, - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - _lcd_goto_bed_leveling - #else - lcd_bed_leveling - #endif + + MENU_ITEM(submenu, MSG_BED_LEVELING, ( + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + _lcd_goto_bed_leveling + #else + lcd_bed_leveling + #endif + ) ); - #elif PLANNER_LEVELING && DISABLED(PROBE_MANUALLY) && DISABLED(SLIM_LCD_MENUS) - MENU_ITEM(gcode, MSG_BED_LEVELING, PSTR("G28\nG29")); + + #elif PLANNER_LEVELING && DISABLED(SLIM_LCD_MENUS) + + #if DISABLED(PROBE_MANUALLY) + MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G28\nG29")); + #endif + if (leveling_is_valid()) { + bool new_level_state = planner.leveling_active; + MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &new_level_state, _lcd_toggle_bed_leveling); + } + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_Z_FADE_HEIGHT, &new_z_fade_height, 0.0, 100.0, _lcd_set_z_fade_height); + #endif + #endif #if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING) @@ -2854,15 +2896,15 @@ void lcd_quick_feedback(const bool clear_buttons) { void lcd_delta_settings() { START_MENU(); MENU_BACK(MSG_DELTA_CALIBRATE); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10.0, delta_height + 10.0, _recalc_delta_settings); MENU_ITEM_EDIT_CALLBACK(float43, "Ex", &delta_endstop_adj[A_AXIS], -5.0, 5.0, _recalc_delta_settings); MENU_ITEM_EDIT_CALLBACK(float43, "Ey", &delta_endstop_adj[B_AXIS], -5.0, 5.0, _recalc_delta_settings); MENU_ITEM_EDIT_CALLBACK(float43, "Ez", &delta_endstop_adj[C_AXIS], -5.0, 5.0, _recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5.0, delta_radius + 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_DELTA_RADIUS, &delta_radius, delta_radius - 5.0, delta_radius + 5.0, _recalc_delta_settings); MENU_ITEM_EDIT_CALLBACK(float43, "Tx", &delta_tower_angle_trim[A_AXIS], -5.0, 5.0, _recalc_delta_settings); MENU_ITEM_EDIT_CALLBACK(float43, "Ty", &delta_tower_angle_trim[B_AXIS], -5.0, 5.0, _recalc_delta_settings); MENU_ITEM_EDIT_CALLBACK(float43, "Tz", &delta_tower_angle_trim[C_AXIS], -5.0, 5.0, _recalc_delta_settings); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, _recalc_delta_settings); + MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_DELTA_DIAG_ROD, &delta_diagonal_rod, delta_diagonal_rod - 5.0, delta_diagonal_rod + 5.0, _recalc_delta_settings); END_MENU(); } @@ -3305,7 +3347,7 @@ void lcd_quick_feedback(const bool clear_buttons) { #if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE) MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu); #elif ENABLED(LIN_ADVANCE) - MENU_ITEM_EDIT(float32, MSG_ADVANCE_K, &planner.extruder_advance_K, 0, 999); + MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K, 0, 999); #endif #if HAS_LCD_CONTRAST @@ -3490,7 +3532,7 @@ void lcd_quick_feedback(const bool clear_buttons) { MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &planner.autotemp_enabled); MENU_ITEM_EDIT(float3, MSG_MIN, &planner.autotemp_min, 0, HEATER_0_MAXTEMP - 15); MENU_ITEM_EDIT(float3, MSG_MAX, &planner.autotemp_max, 0, HEATER_0_MAXTEMP - 15); - MENU_ITEM_EDIT(float32, MSG_FACTOR, &planner.autotemp_factor, 0.0, 1.0); + MENU_ITEM_EDIT(float52, MSG_FACTOR, &planner.autotemp_factor, 0.0, 1.0); #endif // @@ -3506,9 +3548,9 @@ void lcd_quick_feedback(const bool clear_buttons) { #define _PID_BASE_MENU_ITEMS(ELABEL, eindex) \ raw_Ki = unscalePID_i(PID_PARAM(Ki, eindex)); \ raw_Kd = unscalePID_d(PID_PARAM(Kd, eindex)); \ - MENU_ITEM_EDIT(float52, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \ - MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I ELABEL, &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E ## eindex); \ - MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex) + MENU_ITEM_EDIT(float52sign, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \ + MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_I ELABEL, &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E ## eindex); \ + MENU_ITEM_EDIT_CALLBACK(float52sign, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex) #if ENABLED(PID_EXTRUSION_SCALING) #define _PID_MENU_ITEMS(ELABEL, eindex) \ @@ -3729,7 +3771,7 @@ void lcd_quick_feedback(const bool clear_buttons) { #if ENABLED(DELTA) MENU_ITEM_EDIT(float3, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 1, 990); #else - MENU_ITEM_EDIT(float52, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 0.1, 990); + MENU_ITEM_EDIT(float52sign, MSG_VC_JERK, &planner.max_jerk[C_AXIS], 0.1, 990); #endif MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990); @@ -3780,7 +3822,7 @@ void lcd_quick_feedback(const bool clear_buttons) { #if ENABLED(BABYSTEP_ZPROBE_OFFSET) MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); #elif HAS_BED_PROBE - MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); + MENU_ITEM_EDIT(float52, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); #endif #if DISABLED(SLIM_LCD_MENUS) @@ -3818,7 +3860,7 @@ void lcd_quick_feedback(const bool clear_buttons) { MENU_BACK(MSG_CONTROL); #if ENABLED(LIN_ADVANCE) - MENU_ITEM_EDIT(float32, MSG_ADVANCE_K, &planner.extruder_advance_K, 0, 999); + MENU_ITEM_EDIT(float52, MSG_ADVANCE_K, &planner.extruder_advance_K, 0, 999); #endif #if DISABLED(NO_VOLUMETRICS) @@ -3903,15 +3945,15 @@ void lcd_quick_feedback(const bool clear_buttons) { START_MENU(); MENU_BACK(MSG_CONTROL); MENU_ITEM_EDIT_CALLBACK(bool, MSG_AUTORETRACT, &fwretract.autoretract_enabled, fwretract.refresh_autoretract); - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &fwretract.retract_length, 0, 100); + MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT, &fwretract.retract_length, 0, 100); #if EXTRUDERS > 1 - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &fwretract.swap_retract_length, 0, 100); + MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_SWAP, &fwretract.swap_retract_length, 0, 100); #endif MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &fwretract.retract_feedrate_mm_s, 1, 999); - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &fwretract.retract_zlift, 0, 999); - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &fwretract.retract_recover_length, -100, 100); + MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_ZLIFT, &fwretract.retract_zlift, 0, 999); + MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_RECOVER, &fwretract.retract_recover_length, -100, 100); #if EXTRUDERS > 1 - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &fwretract.swap_retract_recover_length, -100, 100); + MENU_ITEM_EDIT(float52sign, MSG_CONTROL_RETRACT_RECOVER_SWAP, &fwretract.swap_retract_recover_length, -100, 100); #endif MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &fwretract.retract_recover_feedrate_mm_s, 1, 999); #if EXTRUDERS > 1 @@ -4819,11 +4861,11 @@ void lcd_quick_feedback(const bool clear_buttons) { DEFINE_MENU_EDIT_TYPE(int16_t, int3, itostr3, 1); DEFINE_MENU_EDIT_TYPE(uint8_t, int8, i8tostr3, 1); DEFINE_MENU_EDIT_TYPE(float, float3, ftostr3, 1.0); - DEFINE_MENU_EDIT_TYPE(float, float32, ftostr32, 100.0); + DEFINE_MENU_EDIT_TYPE(float, float52, ftostr52, 100.0); DEFINE_MENU_EDIT_TYPE(float, float43, ftostr43sign, 1000.0); DEFINE_MENU_EDIT_TYPE(float, float5, ftostr5rj, 0.01); DEFINE_MENU_EDIT_TYPE(float, float51, ftostr51sign, 10.0); - DEFINE_MENU_EDIT_TYPE(float, float52, ftostr52sign, 100.0); + DEFINE_MENU_EDIT_TYPE(float, float52sign, ftostr52sign, 100.0); DEFINE_MENU_EDIT_TYPE(float, float62, ftostr62rj, 100.0); DEFINE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01); diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 0094b2da534..511a0e9a4a9 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -691,10 +691,10 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop if (PAGE_UNDER(7)) { u8g.setPrintPos(5, 7); lcd_print("X:"); - lcd_print(ftostr32(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot])))); + lcd_print(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot])))); u8g.setPrintPos(74, 7); lcd_print("Y:"); - lcd_print(ftostr32(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot])))); + lcd_print(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot])))); } // Print plot position diff --git a/Marlin/ultralcd_impl_HD44780.h b/Marlin/ultralcd_impl_HD44780.h index 2d55a6b77c6..85b2b83b5b8 100644 --- a/Marlin/ultralcd_impl_HD44780.h +++ b/Marlin/ultralcd_impl_HD44780.h @@ -1226,10 +1226,10 @@ static void lcd_implementation_status_screen() { * Show X and Y positions */ _XLABEL(_PLOT_X, 0); - lcd.print(ftostr32(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x])))); + lcd.print(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x])))); _YLABEL(_LCD_W_POS, 0); - lcd.print(ftostr32(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[inverted_y])))); + lcd.print(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[inverted_y])))); lcd.setCursor(_PLOT_X, 0); @@ -1462,9 +1462,9 @@ static void lcd_implementation_status_screen() { * Show all values at right of screen */ _XLABEL(_LCD_W_POS, 1); - lcd.print(ftostr32(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x])))); + lcd.print(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x])))); _YLABEL(_LCD_W_POS, 2); - lcd.print(ftostr32(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[inverted_y])))); + lcd.print(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[inverted_y])))); /** * Show the location value diff --git a/Marlin/utility.cpp b/Marlin/utility.cpp index 6addbf9794d..88a0503d5e6 100644 --- a/Marlin/utility.cpp +++ b/Marlin/utility.cpp @@ -124,7 +124,7 @@ void safe_delay(millis_t ms) { } // Convert signed float to fixed-length string with 023.45 / -23.45 format - char* ftostr32(const float &f) { + char* ftostr52(const float &f) { long i = (f * 1000 + (f < 0 ? -5: 5)) / 10; conv[1] = MINUSOR(i, DIGIMOD(i, 10000)); conv[2] = DIGIMOD(i, 1000); diff --git a/Marlin/utility.h b/Marlin/utility.h index eb950cfbe1d..dff2cec1051 100644 --- a/Marlin/utility.h +++ b/Marlin/utility.h @@ -49,7 +49,7 @@ void safe_delay(millis_t ms); char* ftostr12ns(const float &x); // Convert signed float to fixed-length string with 023.45 / -23.45 format - char* ftostr32(const float &x); + char* ftostr52(const float &x); // Convert float to fixed-length string with +123.4 / -123.4 format char* ftostr41sign(const float &x); diff --git a/Marlin/vector_3.cpp b/Marlin/vector_3.cpp index aebc8c97378..4bfcdeb933c 100644 --- a/Marlin/vector_3.cpp +++ b/Marlin/vector_3.cpp @@ -41,7 +41,7 @@ #include "MarlinConfig.h" -#if HAS_ABL +#if ABL_PLANAR || (HAS_BED_PROBE && ENABLED(AUTO_BED_LEVELING_UBL)) #include "vector_3.h" #include "serial.h"