Added restore settings defaults command.

- New restore setting defaults command. Only wipes ‘$$’ setting in
EEPROM and reloads them based on the defaults used when Grbl was
compiled. Used with a `$RST` command

NOTE: `$RST` is intentionally not listed in the Grbl ‘$’ help message.
This commit is contained in:
Sonny Jeon
2015-06-18 09:23:17 -06:00
parent e14cff3ddc
commit 185de02836
7 changed files with 23 additions and 4 deletions

View File

@ -200,7 +200,14 @@ uint8_t system_execute_line(char *line)
} while (line[char_counter++] != 0);
settings_store_build_info(line);
}
break;
break;
case 'R' : // Restore defaults [IDLE/ALARM]
if (line[++char_counter] != 'S') { return(STATUS_INVALID_STATEMENT); }
if (line[++char_counter] != 'T') { return(STATUS_INVALID_STATEMENT); }
if (line[++char_counter] != 0) { return(STATUS_INVALID_STATEMENT); }
report_feedback_message(MESSAGE_RESTORE_DEFAULTS);
settings_restore_global_settings();
break;
case 'N' : // Startup lines. [IDLE/ALARM]
if ( line[++char_counter] == 0 ) { // Print startup lines
for (helper_var=0; helper_var < N_STARTUP_LINE; helper_var++) {