A single SERIAL_ECHO macro type (#12557)
This commit is contained in:
@ -55,9 +55,9 @@ void GcodeSuite::G30() {
|
||||
const float measured_z = probe_pt(xpos, ypos, raise_after, 1);
|
||||
|
||||
if (!isnan(measured_z)) {
|
||||
SERIAL_PROTOCOLPAIR_F("Bed X: ", xpos);
|
||||
SERIAL_PROTOCOLPAIR_F(" Y: ", ypos);
|
||||
SERIAL_PROTOCOLLNPAIR_F(" Z: ", measured_z);
|
||||
SERIAL_ECHOPAIR("Bed X: ", FIXFLOAT(xpos));
|
||||
SERIAL_ECHOPAIR(" Y: ", FIXFLOAT(ypos));
|
||||
SERIAL_ECHOLNPAIR(" Z: ", FIXFLOAT(measured_z));
|
||||
}
|
||||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
|
@ -108,10 +108,7 @@ void GcodeSuite::G38(const bool is_38_2) {
|
||||
if (ABS(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) {
|
||||
if (!parser.seenval('F')) feedrate_mm_s = homing_feedrate((AxisEnum)i);
|
||||
// If G38.2 fails throw an error
|
||||
if (!G38_run_probe() && is_38_2) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("Failed to reach target");
|
||||
}
|
||||
if (!G38_run_probe() && is_38_2) SERIAL_ERROR_MSG("Failed to reach target");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -32,18 +32,13 @@ void GcodeSuite::M851() {
|
||||
if (parser.seenval('Z')) {
|
||||
const float value = parser.value_linear_units();
|
||||
if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
|
||||
{
|
||||
zprobe_zoffset = value;
|
||||
}
|
||||
else {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");
|
||||
}
|
||||
else
|
||||
SERIAL_ERROR_MSG("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");
|
||||
return;
|
||||
}
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_PROBE_Z_OFFSET);
|
||||
SERIAL_ECHOLNPAIR(": ", zprobe_zoffset);
|
||||
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
|
||||
}
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
|
Reference in New Issue
Block a user