From cc38ae2471c756d3c02b11fff82166fa80d80823 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Thu, 25 Jun 2015 15:05:47 -0600 Subject: [PATCH] Restore parameters minor bug fix. - `$RST=#` was not wiping the G30 positions from EEPROM. Minor but now fixed. --- README.md | 4 ++-- doc/log/commit_log_v0.9i.txt | 26 ++++++++++++++++++++++++++ grbl/settings.c | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b5ca02d..12af2b8 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ Grbl includes full acceleration management with look ahead. That means the contr *** _**Master Branch:**_ -* [Grbl v0.9i Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1EiviDk) _(2015-06-20)_ -* [Grbl v0.9i Atmega328p 16mhz 115200baud with ShapeOko2 defaults](http://bit.ly/1NYIfKl) _(2015-06-20)_ +* [Grbl v0.9i Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1EiviDk) _(2015-06-25)_ +* [Grbl v0.9i Atmega328p 16mhz 115200baud with ShapeOko2 defaults](http://bit.ly/1NYIfKl) _(2015-06-25)_ - **IMPORTANT INFO WHEN UPGRADING TO GRBL v0.9i:** - Baudrate is now **115200** (Up from 9600). - Homing cycle updated. Located based on switch trigger, rather than release point. diff --git a/doc/log/commit_log_v0.9i.txt b/doc/log/commit_log_v0.9i.txt index 3ace508..26ad549 100644 --- a/doc/log/commit_log_v0.9i.txt +++ b/doc/log/commit_log_v0.9i.txt @@ -1,3 +1,29 @@ +---------------- +Date: 2015-06-20 +Author: Sonny Jeon +Subject: New EEPROM restore functions. + +- Tweaked the previous EEPROM restore implementation and added new +functionality. + +- `$RST=$` restores the `$$` grbl settings back to firmware defaults, +which are set when compiled. + +- `$RST=#` restores the `$#` parameters in EEPROM. At times it’s useful +to clear these and start over, rather than manually writing each entry. + +-`$RST=*` wipe all of the data in EEPROM that Grbl uses and restores +them to defaults. This includes `$$` settings, `$#` parameters, `$N` +startup lines, and `$i` build info string. + +NOTE: This doesn’t write zeros throughout the EEPROM. It only writes +where Grbl looks for data. For a complete wipe, please use the Arduino +IDE’s EEPROM clear example. + +- Refactored the restore and wipe functions in settings.c to +accommodate the new commands. + + ---------------- Date: 2015-06-18 Author: Sonny Jeon diff --git a/grbl/settings.c b/grbl/settings.c index f7fb6eb..2b32918 100644 --- a/grbl/settings.c +++ b/grbl/settings.c @@ -99,7 +99,7 @@ void settings_restore(uint8_t restore_flag) { uint8_t idx; float coord_data[N_AXIS]; memset(&coord_data, 0, sizeof(coord_data)); - for (idx=0; idx < SETTING_INDEX_NCOORD; idx++) { settings_write_coord_data(idx, coord_data); } + for (idx=0; idx <= SETTING_INDEX_NCOORD; idx++) { settings_write_coord_data(idx, coord_data); } } if (restore_flag & SETTINGS_RESTORE_STARTUP_LINES) {