Fix MBL XY parameter error messages

Fix #11522
This commit is contained in:
Scott Lahteine 2018-11-05 03:41:28 -06:00
parent 2613ddf61c
commit 486f2a66a9

View File

@ -160,7 +160,8 @@ void GcodeSuite::G29() {
if (parser.seenval('X')) {
px = parser.value_int() - 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;
}
}
@ -172,7 +173,8 @@ void GcodeSuite::G29() {
if (parser.seenval('Y')) {
py = parser.value_int() - 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;
}
}