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:
parent
e14cff3ddc
commit
185de02836
2
Makefile
2
Makefile
@ -42,7 +42,7 @@ FUSES = -U hfuse:w:0xd2:m -U lfuse:w:0xff:m
|
||||
# Tune the lines below only if you know what you are doing:
|
||||
|
||||
AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) -B 10 -F
|
||||
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I. -ffunction-sections
|
||||
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I. -ffunction-sections -fdata-sections
|
||||
|
||||
OBJECTS = $(addprefix $(BUILDDIR)/,$(notdir $(SOURCE:.c=.o)))
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
----------------
|
||||
Date: 2015-05-29
|
||||
Author: Sonny Jeon
|
||||
Subject: Added G61 exact path support.
|
||||
|
||||
- G61 exact path is the Grbl default path control mode, so it’s now
|
||||
added as a supported g-code.
|
||||
|
||||
|
||||
----------------
|
||||
Date: 2015-05-27
|
||||
Author: Sonny Jeon
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
// Grbl versioning system
|
||||
#define GRBL_VERSION "0.9i"
|
||||
#define GRBL_VERSION_BUILD "20150529"
|
||||
#define GRBL_VERSION_BUILD "20150618"
|
||||
|
||||
// Define standard libraries used by Grbl.
|
||||
#include <avr/io.h>
|
||||
|
@ -138,6 +138,8 @@ void report_feedback_message(uint8_t message_code)
|
||||
printPgmString(PSTR("Check Door")); break;
|
||||
case MESSAGE_PROGRAM_END:
|
||||
printPgmString(PSTR("Pgm End")); break;
|
||||
case MESSAGE_RESTORE_DEFAULTS:
|
||||
printPgmString(PSTR("Restoring defaults")); break;
|
||||
}
|
||||
printPgmString(PSTR("]\r\n"));
|
||||
}
|
||||
|
@ -69,6 +69,7 @@
|
||||
#define MESSAGE_DISABLED 5
|
||||
#define MESSAGE_SAFETY_DOOR_AJAR 6
|
||||
#define MESSAGE_PROGRAM_END 7
|
||||
#define MESSAGE_RESTORE_DEFAULTS 8
|
||||
|
||||
// Prints system status messages.
|
||||
void report_status_message(uint8_t status_code);
|
||||
|
@ -101,7 +101,7 @@ void settings_init();
|
||||
// Helper functions to clear and restore EEPROM defaults
|
||||
void settings_restore_global_settings();
|
||||
void settings_clear_parameters();
|
||||
void settings_clear_startup_line();
|
||||
void settings_clear_startup_lines();
|
||||
void settings_clear_build_info();
|
||||
|
||||
// A helper method to set new settings from command line
|
||||
|
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user