diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 509427b61bcef8629c9995464a62b8a3e3a18a34..c0aab3ee1e2569c4fc285dabd73b6c3d5f805c0c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -719,18 +719,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index f7c51e2526e8e9a3da8865ee3aab29947ba9b954..b99c3fb9b08634d959383132593e915c53c9002d 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -319,7 +319,7 @@ float code_value_temp_diff(); extern float z_endstop_adj; #endif -#if ENABLED(AUTO_BED_LEVELING_FEATURE) +#if HAS_BED_PROBE extern float zprobe_zoffset; #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 3d63bec3dfee143bf1f22952d1e72a9cb35164d8..2b6816488a77473cd474e509569a0c8a04343ad1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -364,9 +364,12 @@ static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL static uint8_t target_extruder; +#if HAS_BED_PROBE + float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; +#endif + #if ENABLED(AUTO_BED_LEVELING_FEATURE) int xy_travel_speed = XY_TRAVEL_SPEED; - float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; bool bed_leveling_in_progress = false; #endif @@ -1490,7 +1493,7 @@ static void set_axis_is_at_home(AxisEnum axis) { current_position[axis] = base_home_pos(axis) + home_offset[axis]; update_software_endstops(axis); - #if ENABLED(AUTO_BED_LEVELING_FEATURE) && Z_HOME_DIR < 0 + #if HAS_BED_PROBE && Z_HOME_DIR < 0 if (axis == Z_AXIS) { current_position[Z_AXIS] -= zprobe_zoffset; #if ENABLED(DEBUG_LEVELING_FEATURE) @@ -6263,9 +6266,9 @@ inline void gcode_M503() { #endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED -#ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET +#if HAS_BED_PROBE - inline void gcode_SET_Z_PROBE_OFFSET() { + inline void gcode_M851() { SERIAL_ECHO_START; SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET); @@ -6291,7 +6294,7 @@ inline void gcode_M503() { SERIAL_EOL; } -#endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET +#endif // HAS_BED_PROBE #if ENABLED(FILAMENTCHANGEENABLE) @@ -7400,7 +7403,7 @@ void process_next_command() { #ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET case CUSTOM_M_CODE_SET_Z_PROBE_OFFSET: - gcode_SET_Z_PROBE_OFFSET(); + gcode_M851(); break; #endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 130763123d2476b7dd9025f5d70ccf629f6446a6..4bad3ce0ce3b683458fd81bc2eabaeb4c7f3d9d0 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -210,7 +210,7 @@ void Config_StoreSettings() { for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy); #endif // MESH_BED_LEVELING - #if DISABLED(AUTO_BED_LEVELING_FEATURE) + #if !HAS_BED_PROBE float zprobe_zoffset = 0; #endif EEPROM_WRITE_VAR(i, zprobe_zoffset); @@ -389,7 +389,7 @@ void Config_RetrieveSettings() { for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy); #endif // MESH_BED_LEVELING - #if DISABLED(AUTO_BED_LEVELING_FEATURE) + #if !HAS_BED_PROBE float zprobe_zoffset = 0; #endif EEPROM_READ_VAR(i, zprobe_zoffset); @@ -554,7 +554,7 @@ void Config_ResetDefault() { mbl.reset(); #endif - #if ENABLED(AUTO_BED_LEVELING_FEATURE) + #if HAS_BED_PROBE zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; #endif @@ -927,20 +927,13 @@ void Config_PrintSettings(bool forReplay) { /** * Auto Bed Leveling */ - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #if ENABLED(CUSTOM_M_CODES) - if (!forReplay) { - CONFIG_ECHO_START; - SERIAL_ECHOLNPGM("Z-Probe Offset (mm):"); - } + #if HAS_BED_PROBE + if (!forReplay) { CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M" STRINGIFY(CUSTOM_M_CODE_SET_Z_PROBE_OFFSET) " Z", zprobe_zoffset); - #else - if (!forReplay) { - CONFIG_ECHO_START; - SERIAL_ECHOPAIR("Z-Probe Offset (mm):", zprobe_zoffset); - } - #endif + SERIAL_ECHOLNPGM("Z-Probe Offset (mm):"); + } + CONFIG_ECHO_START; + SERIAL_ECHOPAIR(" M851 Z", zprobe_zoffset); SERIAL_EOL; #endif } diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index d5fddbbd0bf8f31d8ad22246d190d82bab1144da..d86161a58fac9f6347e854837f6da9022ead42c1 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -718,18 +718,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index f92302db53a9e311d9b86fbc2db88a7330c1e520..cad842c35ee660ac29c6cb4e5619071dc6ca78bb 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -702,18 +702,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index c243209d5e3afdfcf911b720440bed5bb8e67773..c08e57e3c49ff9cebbf509c0e9ceba707aca8144 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -700,18 +700,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 34ee387ee527b2b82ae7d0cc6b0cf10f81092c1c..a2f17dd2d77a8135cb75ea2dab64fd4013fae071 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -711,18 +711,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index d5e6a0df0453359d8f32549a374b19805e1ff0ba..64f39854dc56c136700c3e57b53d52d90be11aeb 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -713,17 +713,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -5 - #define Z_PROBE_OFFSET_RANGE_MAX 0 - #endif -#endif +// @section probes + +#define Z_PROBE_OFFSET_RANGE_MIN -5 +#define Z_PROBE_OFFSET_RANGE_MAX 0 // @section extras diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 6797fcd89f748ffbf60776306a38bc29fb47ffb2..ababf64bb22e54a97581835fff91e8a95c26bec3 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -736,18 +736,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 9a4a2c7fbd7bd5fd64728f150d3595a0e889389c..66af697dd01cb32e2c2b77a2654822a2bfa6fd4d 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -719,18 +719,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index dff38c635e660bc2258869803e1f119c3260aeb3..2b544085bfa470d1202ef9ea3d03d6442946de61 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -714,18 +714,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 5ac806382bcb2dac6c9ae0d449b93890f81dc9a5..4e2792a1d234d9dd13dce58c1229308e425206c8 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -727,18 +727,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -//#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 5c1742d68cb186ed15b6666019a40f712515c1d4..a015b7559c8ae84d0c869b4d4d71679247021243 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -740,18 +740,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 4055e15a3f6c332101a460cd0356da7017535770..0977bc207c4deff484ba35879f8f2ff736625228 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -711,18 +711,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index fdbf9a86978dfcdcf508e9eeb42e300ab2a65b37..f9f04744ef0d506d4d1092f938430e6122f0f422 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -719,18 +719,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index d6b783a95b332dcee2453622f518161f6db3ed9a..1a4a5b364174e9a39e25e4bc188386b4b7782a75 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -808,18 +808,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 6f2963c37b5274f7739b8fe67b9fe1b6d27f3c4a..a555b60053a6d2390fb9bbd5deb4199ed9070ab4 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -802,18 +802,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 5b4436647e3e8310894e0b5ec03ff4322f4e2886..cfb9ef35456796b5c574075090fe8e97455f012c 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -805,18 +805,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 9ec47259ddce2fb8e2570ea0614767965996c390..22308c45883c30a46dda48d50cfd311fceac93af 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -805,17 +805,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 - #endif -#endif +// @section probes + +#define Z_PROBE_OFFSET_RANGE_MIN -15 +#define Z_PROBE_OFFSET_RANGE_MAX 5 // @section extras diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 646c894163c5f173658bd576f8fc7036c4c238a1..f871b083f16969157747e277cbc0e7ee7e6db1bd 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -807,18 +807,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 2ad761ce5938a78bc1809315b80c5ec5ca5c6a6b..d0ac688f9712a3cf247fa0696438180d4d6e7484 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -722,18 +722,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 4d8b04e38cf256fc8c530df71ed41c0e4355f724..8e40a5c5b568ba357de8290f9298b14d36a967e7 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -713,18 +713,6 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //============================= Additional Features =========================== //============================================================================= -// @section more - -// Custom M code points -#define CUSTOM_M_CODES -#if ENABLED(CUSTOM_M_CODES) - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif -#endif - // @section extras // diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index add6cb0292287b271be5ecc8ac989f1b5f44ce26..5372626849d0e3687bbaf4dc7a54918b58f6d719 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1684,7 +1684,7 @@ static void lcd_status_screen() { static void lcd_control_motion_menu() { START_MENU(); MENU_ITEM(back, MSG_CONTROL); - #if ENABLED(AUTO_BED_LEVELING_FEATURE) + #if HAS_BED_PROBE MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); #endif // Manual bed leveling, Bed Z: