1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-18 08:17:18 +00:00

Merge Save a few bytes (PR#79)

This commit is contained in:
Richard Wackerbarth 2015-08-12 21:27:40 -05:00
commit c2f695c84e

View File

@ -4786,31 +4786,29 @@ inline void gcode_M503() {
#ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET #ifdef CUSTOM_M_CODE_SET_Z_PROBE_OFFSET
inline void gcode_SET_Z_PROBE_OFFSET() { inline void gcode_SET_Z_PROBE_OFFSET() {
float value;
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET);
SERIAL_CHAR(' ');
if (code_seen('Z')) { if (code_seen('Z')) {
value = code_value(); float value = code_value();
if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) { if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) {
zprobe_zoffset = value; zprobe_zoffset = value;
SERIAL_ECHO_START; SERIAL_ECHOPGM(MSG_OK);
SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK);
SERIAL_EOL;
} }
else { else {
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET);
SERIAL_ECHOPGM(MSG_Z_MIN); SERIAL_ECHOPGM(MSG_Z_MIN);
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN); SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN);
SERIAL_ECHOPGM(MSG_Z_MAX); SERIAL_ECHOPGM(MSG_Z_MAX);
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX); SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX);
SERIAL_EOL;
} }
} }
else { else {
SERIAL_ECHO_START; SERIAL_ECHOPAIR(": ", zprobe_zoffset);
SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET " : ");
SERIAL_ECHO(zprobe_zoffset);
SERIAL_EOL;
} }
SERIAL_EOL;
} }
#endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET #endif // CUSTOM_M_CODE_SET_Z_PROBE_OFFSET