Browse Source

Tweak 'echo_not_entered' used by MBL's G29

pull/1/head
Scott Lahteine 6 years ago
parent
commit
bed15fcd81
  1. 26
      Marlin/src/gcode/bedlevel/mbl/G29.cpp

26
Marlin/src/gcode/bedlevel/mbl/G29.cpp

@ -39,7 +39,7 @@
#include "../../../module/stepper.h"
// Save 130 bytes with non-duplication of PSTR
void echo_not_entered() { SERIAL_PROTOCOLLNPGM(" not entered."); }
inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_PROTOCOLLNPGM(" not entered."); }
/**
* G29: Mesh-based Z probe, probes a grid and produces a
@ -165,10 +165,8 @@ void GcodeSuite::G29() {
return;
}
}
else {
SERIAL_CHAR('X'); echo_not_entered();
return;
}
else
return echo_not_entered('X');
if (parser.seenval('Y')) {
py = parser.value_int() - 1;
@ -178,26 +176,20 @@ void GcodeSuite::G29() {
return;
}
}
else {
SERIAL_CHAR('Y'); echo_not_entered();
return;
}
else
return echo_not_entered('Y');
if (parser.seenval('Z'))
mbl.z_values[px][py] = parser.value_linear_units();
else {
SERIAL_CHAR('Z'); echo_not_entered();
return;
}
else
return echo_not_entered('Z');
break;
case MeshSetZOffset:
if (parser.seenval('Z'))
mbl.z_offset = parser.value_linear_units();
else {
SERIAL_CHAR('Z'); echo_not_entered();
return;
}
else
return echo_not_entered('Z');
break;
case MeshReset:

Loading…
Cancel
Save