Tweak 'echo_not_entered' used by MBL's G29

This commit is contained in:
Scott Lahteine 2018-11-10 01:32:29 -06:00
parent c239131ff5
commit bed15fcd81

View file

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