diff --git a/settings.c b/settings.c index 9cdd147..ef880c6 100644 --- a/settings.c +++ b/settings.c @@ -68,6 +68,16 @@ void write_global_settings() // Method to reset Grbl global settings back to defaults. void settings_reset() { + // Clear startup lines and build info user data. Parameters should be ok. + // TODO: For next version, remove these clears. Only here because line buffer increased. + eeprom_put_char(EEPROM_ADDR_BUILD_INFO , 0); + #if N_STARTUP_LINE > 0 + eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK, 0); + #endif + #if N_STARTUP_LINE > 1 + eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK+(LINE_BUFFER_SIZE+1), 0); + #endif + settings.pulse_microseconds = DEFAULT_STEP_PULSE_MICROSECONDS; settings.stepper_idle_lock_time = DEFAULT_STEPPER_IDLE_LOCK_TIME; settings.step_invert_mask = DEFAULT_STEPPING_INVERT_MASK; diff --git a/settings.h b/settings.h index 3fa4501..1441446 100644 --- a/settings.h +++ b/settings.h @@ -33,7 +33,7 @@ // 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 -#define SETTINGS_VERSION 9 +#define SETTINGS_VERSION 9 // NOTE: Check settings_reset() when moving to next version. // Define bit flag masks for the boolean settings in settings.flag. #define BITFLAG_REPORT_INCHES bit(0)