Skip to content

Commit 9bf3839

Browse files
kisslorandLCh-77
authored andcommitted
🚸 M401 H - Report BLTouch HS State (MarlinFirmware#23724)
1 parent 8515722 commit 9bf3839

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Marlin/src/gcode/probe/M401_M402.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@
3636
* M401: Deploy and activate the Z probe
3737
*
3838
* With BLTOUCH_HS_MODE:
39+
* H Report the current BLTouch HS mode state and exit
3940
* S<bool> Set High Speed (HS) Mode and exit without deploy
4041
*/
4142
void GcodeSuite::M401() {
42-
if (parser.seen('S')) {
43+
const bool seenH = parser.seen_test('H'),
44+
seenS = parser.seen('S');
45+
if (seenH || seenS) {
4346
#ifdef BLTOUCH_HS_MODE
44-
bltouch.high_speed_mode = parser.value_bool();
47+
if (seenS) bltouch.high_speed_mode = parser.value_bool();
48+
SERIAL_ECHO_START();
49+
SERIAL_ECHOPGM("BLTouch HS mode ");
50+
serialprintln_onoff(bltouch.high_speed_mode);
4551
#endif
4652
}
4753
else {

0 commit comments

Comments
 (0)