From 486f2a66a93909cfa9e800bb4dc1f14880bc6678 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 5 Nov 2018 03:41:28 -0600 Subject: [PATCH] Fix MBL XY parameter error messages Fix #11522 --- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 8c970e89b0..d0c1e7e799 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -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; } }