From 5261d35737f4a129327de8c5b9ed7e7f4cccbe30 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 25 Mar 2015 21:20:50 -0700 Subject: [PATCH] Fix custom m-code behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t set CUSTOM_M_CODE_SET_Z_PROBE_OFFSET if there’s no Z probe --- Marlin/Configuration.h | 8 +++++--- Marlin/configurator/config/Configuration.h | 8 +++++--- Marlin/example_configurations/Felix/Configuration.h | 8 +++++--- Marlin/example_configurations/Felix/Configuration_DUAL.h | 8 +++++--- Marlin/example_configurations/Hephestos/Configuration.h | 8 +++++--- Marlin/example_configurations/K8200/Configuration.h | 8 +++++--- Marlin/example_configurations/SCARA/Configuration.h | 8 +++++--- Marlin/example_configurations/WITBOX/Configuration.h | 8 +++++--- .../example_configurations/delta/generic/Configuration.h | 8 +++++--- .../delta/kossel_mini/Configuration.h | 8 +++++--- Marlin/example_configurations/makibox/Configuration.h | 8 +++++--- .../example_configurations/tvrrug/Round2/Configuration.h | 8 +++++--- 12 files changed, 60 insertions(+), 36 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index f5a36e6b9c9..cb46c530e4c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -533,9 +533,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 71cbdebaecf..78c40b2e9b2 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -570,9 +570,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 extras diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index e9801813f82..17631860c80 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -512,9 +512,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index e9e4623cab1..e72277417ca 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -512,9 +512,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index c5b0243d577..1e726a0b76e 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -540,9 +540,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index bc0f3e5dfe3..edb026b7af4 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -544,9 +544,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index d42bebe3af3..79b3ded9808 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -570,9 +570,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points //#define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 481b5912553..6362bb99711 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -537,9 +537,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 0baf7de1c0f..9a416560540 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -553,9 +553,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 9f5f89ca5a2..ca77c398481 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -555,9 +555,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index f6561b3af8f..341ac603486 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -535,9 +535,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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 diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 17928b536bf..da82ccd636b 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -542,9 +542,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // Custom M code points #define CUSTOM_M_CODES #ifdef CUSTOM_M_CODES - #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851 - #define Z_PROBE_OFFSET_RANGE_MIN -15 - #define Z_PROBE_OFFSET_RANGE_MAX -5 + #ifdef ENABLE_AUTO_BED_LEVELING + #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