From 832e8819556dd482772e48bd9db9a3e0563a9455 Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Wed, 10 Mar 2021 17:46:19 +0100
Subject: [PATCH 1/2] Disable M120 M121
---
Firmware/Marlin_main.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp
index 547f4e21..fd2a6e39 100755
--- a/Firmware/Marlin_main.cpp
+++ b/Firmware/Marlin_main.cpp
@@ -6967,19 +6967,21 @@ Sigma_Exit:
lcd_setstatus(strchr_pointer + 5);
break;*/
+#if 0 //Disable these for the time being
/*!
- ### M120 - Enable endstops M120: Enable endstop detection
+ ### M120 - Enable endstops M120: Enable endstop detection
*/
case 120:
enable_endstops(true) ;
break;
/*!
- ### M121 - Disable endstops M121: Disable endstop detection
+ ### M121 - Disable endstops M121: Disable endstop detection
*/
case 121:
enable_endstops(false) ;
break;
+#endif //0
/*!
### M119 - Get endstop states M119: Get Endstop Status
From 6355458052f2be41e6e4ae038695920dae302192 Mon Sep 17 00:00:00 2001
From: 3d-gussner <3d.gussner@gmail.com>
Date: Thu, 11 Mar 2021 15:00:49 +0100
Subject: [PATCH 2/2] Add def `M120_M121_ENABLED` to `Configuration_adv.h`
---
Firmware/Configuration_adv.h | 6 ++++++
Firmware/Marlin_main.cpp | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Firmware/Configuration_adv.h b/Firmware/Configuration_adv.h
index 75ac0be9..59590b6f 100644
--- a/Firmware/Configuration_adv.h
+++ b/Firmware/Configuration_adv.h
@@ -387,6 +387,12 @@ const unsigned int dropsegments=5; //everything with less than this number of st
*/
#define EXTENDED_CAPABILITIES_REPORT
+/**
+ * Enable M120/M121 G-code commands
+ *
+ */
+//#define M120_M121_ENABLED //Be careful enabling and using these G-code commands.
+
//===========================================================================
//============================= Define Defines ============================
//===========================================================================
diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp
index fd2a6e39..fb61b872 100755
--- a/Firmware/Marlin_main.cpp
+++ b/Firmware/Marlin_main.cpp
@@ -6967,7 +6967,7 @@ Sigma_Exit:
lcd_setstatus(strchr_pointer + 5);
break;*/
-#if 0 //Disable these for the time being
+#ifdef M120_M121_ENABLED
/*!
### M120 - Enable endstops M120: Enable endstop detection
*/
@@ -6981,7 +6981,7 @@ Sigma_Exit:
case 121:
enable_endstops(false) ;
break;
-#endif //0
+#endif //M120_M121_ENABLED
/*!
### M119 - Get endstop states M119: Get Endstop Status