Skip to content
Snippets Groups Projects
Commit 486f2a66 authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Fix MBL XY parameter error messages

Fix #11522
parent 2613ddf6
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,8 @@ void GcodeSuite::G29() { ...@@ -160,7 +160,8 @@ void GcodeSuite::G29() {
if (parser.seenval('X')) { if (parser.seenval('X')) {
px = parser.value_int() - 1; px = parser.value_int() - 1;
if (!WITHIN(px, 0, GRID_MAX_POINTS_X - 1)) { if (!WITHIN(px, 0, GRID_MAX_POINTS_X - 1)) {
SERIAL_PROTOCOLLNPGM("X out of range (1-" STRINGIFY(GRID_MAX_POINTS_X) ")."); SERIAL_PROTOCOLPAIR("X out of range (0-", int(GRID_MAX_POINTS_X));
SERIAL_PROTOCOLLNPGM(")");
return; return;
} }
} }
...@@ -172,7 +173,8 @@ void GcodeSuite::G29() { ...@@ -172,7 +173,8 @@ void GcodeSuite::G29() {
if (parser.seenval('Y')) { if (parser.seenval('Y')) {
py = parser.value_int() - 1; py = parser.value_int() - 1;
if (!WITHIN(py, 0, GRID_MAX_POINTS_Y - 1)) { if (!WITHIN(py, 0, GRID_MAX_POINTS_Y - 1)) {
SERIAL_PROTOCOLLNPGM("Y out of range (1-" STRINGIFY(GRID_MAX_POINTS_Y) ")."); SERIAL_PROTOCOLPAIR("Y out of range (0-", int(GRID_MAX_POINTS_Y));
SERIAL_PROTOCOLLNPGM(")");
return; return;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment