From 4f62ae97640a0888825d615fce4178de42e74fa9 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sat, 9 Oct 2021 14:07:02 -0400 Subject: [PATCH] Return on mode change without deploying --- Marlin/src/gcode/probe/M401_M402.cpp | 6 +++++- Marlin/src/module/settings.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/probe/M401_M402.cpp b/Marlin/src/gcode/probe/M401_M402.cpp index aef34f3a1e..95828c23b1 100644 --- a/Marlin/src/gcode/probe/M401_M402.cpp +++ b/Marlin/src/gcode/probe/M401_M402.cpp @@ -33,16 +33,20 @@ /** * M401: Deploy and activate the Z probe + * BLTouch Only : + * S : Set High Speed Mode */ void GcodeSuite::M401() { #if ENABLED(BLTOUCH) const bool seen_S = parser.seen('S'), to_enable = (seen_S && parser.value_bool()); - if (seen_S) + if (seen_S) { if(to_enable) bltouch.bltouch_high_speed = true; else bltouch.bltouch_high_speed = false; + return; + } #endif probe.deploy(); TERN_(PROBE_TARE, probe.tare()); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 9698348ae3..80b9736478 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -277,7 +277,7 @@ typedef struct SettingsDataStruct { // BLTOUCH // bool bltouch_last_written_mode; - bool bltouch_high_speed;. + bool bltouch_high_speed; // // Kinematic Settings