Browse Source

🚸 M401 H - Report BLTouch HS State (#23724)

kisslorand 2 years ago
parent
commit
0563626286
No account linked to committer's email address
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      Marlin/src/gcode/probe/M401_M402.cpp

+ 8
- 2
Marlin/src/gcode/probe/M401_M402.cpp View File

@@ -36,12 +36,18 @@
36 36
  * M401: Deploy and activate the Z probe
37 37
  *
38 38
  * With BLTOUCH_HS_MODE:
39
+ *  H       Report the current BLTouch HS mode state and exit
39 40
  *  S<bool> Set High Speed (HS) Mode and exit without deploy
40 41
  */
41 42
 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) {
43 46
     #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);
45 51
     #endif
46 52
   }
47 53
   else {

Loading…
Cancel
Save