From 7cb162ab3e822c6b188d41097e83671d774b69bb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 5 Nov 2018 03:42:24 -0600 Subject: [PATCH] Fix MBL XY parameter error messages --- Marlin/Marlin_main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 88ab61d861..da0cbd9678 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4591,7 +4591,8 @@ void home_all_axes() { gcode_G28(true); } 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; } } @@ -4603,7 +4604,8 @@ void home_all_axes() { gcode_G28(true); } 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; } }