diff --git a/README.md b/README.md index 2db84de..1cc8055 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ Grbl includes full acceleration management with look ahead. That means the contr - New '$' Grbl settings for max and min spindle rpm. Allows for tweaking the PWM output to more closely match true spindle rpm. When max rpm is set to zero or less than min rpm, the PWM pin D11 will act like a simple enable on/off output. +- Updated G28 and G30 behavior from NIST to LinuxCNC g-code description. In short, if a intermediate motion is specified, only the axes specified will move to the stored coordinates, not all axes as before. + - A few bug fixes and lots of refactoring to make the code more efficient and flexible. diff --git a/doc/log/commit_log_v0.9i.txt b/doc/log/commit_log_v0.9i.txt index 92d2e8e..548e29e 100644 --- a/doc/log/commit_log_v0.9i.txt +++ b/doc/log/commit_log_v0.9i.txt @@ -1,3 +1,12 @@ +---------------- +Date: 2015-09-05 +Author: Sonny Jeon +Subject: Parking motion bug fix. + +- Parking motion would intermittently complete the queued tool path +upon resuming in certain scenarios. Now fixed. + + ---------------- Date: 2015-08-29 Author: Sonny Jeon diff --git a/grbl/gcode.c b/grbl/gcode.c index 7507f4b..270f813 100644 --- a/grbl/gcode.c +++ b/grbl/gcode.c @@ -615,19 +615,26 @@ uint8_t gc_execute_line(char *line) // Check remaining non-modal commands for errors. switch (gc_block.non_modal_command) { - case NON_MODAL_GO_HOME_0: - // [G28 Errors]: Cutter compensation is enabled. - // Retreive G28 go-home position data (in machine coordinates) from EEPROM - if (!axis_words) { axis_command = AXIS_COMMAND_NONE; } // Set to none if no intermediate motion. - if (!settings_read_coord_data(SETTING_INDEX_G28,parameter_data)) { FAIL(STATUS_SETTING_READ_FAIL); } + case NON_MODAL_GO_HOME_0: // G28 + case NON_MODAL_GO_HOME_1: // G30 + // [G28/30 Errors]: Cutter compensation is enabled. + // Retreive G28/30 go-home position data (in machine coordinates) from EEPROM + if (gc_block.non_modal_command == NON_MODAL_GO_HOME_0) { + if (!settings_read_coord_data(SETTING_INDEX_G28,parameter_data)) { FAIL(STATUS_SETTING_READ_FAIL); } + } else { // == NON_MODAL_GO_HOME_1 + if (!settings_read_coord_data(SETTING_INDEX_G30,parameter_data)) { FAIL(STATUS_SETTING_READ_FAIL); } + } + if (axis_words) { + // Move only the axes specified in secondary move. + for (idx=0; idx