Ver código fonte

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

kisslorand 2 anos atrás
pai
commit
0563626286
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 8 adições e 2 exclusões
  1. 8
    2
      Marlin/src/gcode/probe/M401_M402.cpp

+ 8
- 2
Marlin/src/gcode/probe/M401_M402.cpp Ver arquivo

@@ -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 {

Carregando…
Cancelar
Salvar