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

This commit is contained in:
kisslorand 2022-03-12 02:21:08 +02:00 committed by Scott Lahteine
parent 7dae720de5
commit 61fb382868

View File

@ -36,12 +36,18 @@
* M401: Deploy and activate the Z probe * M401: Deploy and activate the Z probe
* *
* With BLTOUCH_HS_MODE: * With BLTOUCH_HS_MODE:
* H Report the current BLTouch HS mode state and exit
* S<bool> Set High Speed (HS) Mode and exit without deploy * S<bool> Set High Speed (HS) Mode and exit without deploy
*/ */
void GcodeSuite::M401() { 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 #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 #endif
} }
else { else {