A single SERIAL_ECHO macro type (#12557)

This commit is contained in:
Scott Lahteine
2018-11-29 16:58:58 -06:00
committed by GitHub
parent 69d869c3d9
commit c986239837
86 changed files with 1016 additions and 1356 deletions

View File

@ -293,10 +293,9 @@ void GcodeSuite::G2_G3(const bool clockwise) {
#if ENABLED(ARC_P_CIRCLES)
// P indicates number of circles to do
int8_t circles_to_do = parser.byteval('P');
if (!WITHIN(circles_to_do, 0, 100)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_ARC_ARGS);
}
if (!WITHIN(circles_to_do, 0, 100))
SERIAL_ERROR_MSG(MSG_ERR_ARC_ARGS);
while (circles_to_do--)
plan_arc(current_position, arc_offset, clockwise);
#endif
@ -305,11 +304,8 @@ void GcodeSuite::G2_G3(const bool clockwise) {
plan_arc(destination, arc_offset, clockwise);
reset_stepper_timeout();
}
else {
// Bad arguments
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_ARC_ARGS);
}
else
SERIAL_ERROR_MSG(MSG_ERR_ARC_ARGS);
}
}

View File

@ -50,8 +50,7 @@ void GcodeSuite::G5() {
#if ENABLED(CNC_WORKSPACE_PLANES)
if (workspace_plane != PLANE_XY) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_BAD_PLANE_MODE);
SERIAL_ERROR_MSG(MSG_ERR_BAD_PLANE_MODE);
return;
}
#endif