From 61fb3828688c377178031142ba9cfaa3512cb915 Mon Sep 17 00:00:00 2001 From: kisslorand <50251547+kisslorand@users.noreply.github.com> Date: Sat, 12 Mar 2022 02:21:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20M401=20H=20-=20Report=20BLTouch?= =?UTF-8?q?=20HS=20State=20(#23724)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/probe/M401_M402.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/probe/M401_M402.cpp b/Marlin/src/gcode/probe/M401_M402.cpp index 7cbae76f4b..3389574919 100644 --- a/Marlin/src/gcode/probe/M401_M402.cpp +++ b/Marlin/src/gcode/probe/M401_M402.cpp @@ -36,12 +36,18 @@ * M401: Deploy and activate the Z probe * * With BLTOUCH_HS_MODE: + * H Report the current BLTouch HS mode state and exit * S Set High Speed (HS) Mode and exit without deploy */ void GcodeSuite::M401() { - if (parser.seen('S')) { + const bool seenH = parser.seen_test('H'), + seenS = parser.seen('S'); + if (seenH || seenS) { #ifdef BLTOUCH_HS_MODE - bltouch.high_speed_mode = parser.value_bool(); + if (seenS) bltouch.high_speed_mode = parser.value_bool(); + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("BLTouch HS mode "); + serialprintln_onoff(bltouch.high_speed_mode); #endif } else {