From f4f7d7d05e56aca28aa0d45d8e57526949b5d9d6 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Thu, 3 Jul 2014 18:16:47 -0600 Subject: [PATCH] G18 reporting bug fix. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - G18 wasn’t getting reported back to the user correctly, even though it has been set internally. Fixed the reporting code to reflect this accurately. --- report.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/report.c b/report.c index 6cca787..ab0c937 100644 --- a/report.c +++ b/report.c @@ -235,10 +235,11 @@ void report_gcode_modes() printPgmString(PSTR(" G")); printInteger(gc.coord_select+54); - if (gc.plane_axis_0 == X_AXIS) { - if (gc.plane_axis_1 == Y_AXIS) { printPgmString(PSTR(" G17")); } - else { printPgmString(PSTR(" G18")); } - } else { printPgmString(PSTR(" G19")); } + switch (gc.plane_axis_0) { + case X_AXIS: printPgmString(PSTR(" G17")); break; + case Z_AXIS: printPgmString(PSTR(" G18")); break; + default: printPgmString(PSTR(" G19")); + } if (gc.inches_mode) { printPgmString(PSTR(" G20")); } else { printPgmString(PSTR(" G21")); }