Save another 30 bytes in gcode_SET_Z_PROBE_OFFSET

This commit is contained in:
Scott Lahteine 2015-08-12 17:56:21 -07:00 committed by Richard Wackerbarth
parent 91122277f4
commit a1eb90d5c0

View File

@ -4795,21 +4795,20 @@ inline void gcode_M503() {
float value = code_value();
if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) {
zprobe_zoffset = value;
SERIAL_ECHOLNPGM(MSG_OK);
SERIAL_EOL;
SERIAL_ECHOPGM(MSG_OK);
}
else {
SERIAL_ECHOPGM(MSG_Z_MIN);
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN);
SERIAL_ECHOPGM(MSG_Z_MAX);
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX);
SERIAL_EOL;
}
}
else {
SERIAL_ECHOPAIR(": ", zprobe_zoffset);
SERIAL_EOL;
}
SERIAL_EOL;
}
#endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET