From 955a9f3cf8b50fc6bdc11d2530543024398a64aa Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Mon, 4 Aug 2014 06:25:17 -0600 Subject: [PATCH] Allow '$$' in check mode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Now allows the ‘$$’ view Grbl settings while in check mode - Updated the version build date --- settings.h | 2 +- system.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/settings.h b/settings.h index 267f00b..50cfceb 100644 --- a/settings.h +++ b/settings.h @@ -24,7 +24,7 @@ #define GRBL_VERSION "0.9g" -#define GRBL_VERSION_BUILD "20140801" +#define GRBL_VERSION_BUILD "20140804" // Version of the EEPROM data. Will be used to migrate existing data from older versions of Grbl // when firmware is upgraded. Always stored in byte 0 of eeprom diff --git a/system.c b/system.c index 710dd6d..9fc9cb8 100644 --- a/system.c +++ b/system.c @@ -86,6 +86,10 @@ uint8_t system_execute_line(char *line) float parameter, value; switch( line[char_counter] ) { case 0 : report_grbl_help(); break; + case '$' : // Prints Grbl settings + if ( line[++char_counter] != 0 ) { return(STATUS_INVALID_STATEMENT); } + else { report_grbl_settings(); } + break; case 'G' : // Prints gcode parser state if ( line[++char_counter] != 0 ) { return(STATUS_INVALID_STATEMENT); } else { report_gcode_modes(); } @@ -128,10 +132,6 @@ uint8_t system_execute_line(char *line) // Block any system command that requires the state as IDLE/ALARM. (i.e. EEPROM, homing) if ( !(sys.state == STATE_IDLE || sys.state == STATE_ALARM) ) { return(STATUS_IDLE_ERROR); } switch( line[char_counter] ) { - case '$' : // Prints Grbl settings [IDLE/ALARM] - if ( line[++char_counter] != 0 ) { return(STATUS_INVALID_STATEMENT); } - else { report_grbl_settings(); } - break; case '#' : // Print Grbl NGC parameters if ( line[++char_counter] != 0 ) { return(STATUS_INVALID_STATEMENT); } else { report_ngc_parameters(); }