Hard limits code minor updates.

- Fixed a bug that would not disable the steppers if a user issues a
system abort during a homing cycle.

- Updated the hard limit interrupt to be more correct and to issue a
shutdown for the right situations when the switch has been triggered.

- Added a status message to indicate to the user what happened and what
to do upon a hard limit trigger.
This commit is contained in:
Sonny Jeon
2012-10-18 21:29:07 -06:00
parent df5bb70b25
commit 39e11b696f
7 changed files with 26 additions and 17 deletions

View File

@ -57,6 +57,8 @@ void protocol_status_message(int8_t status_code)
printPgmString(PSTR("Invalid command\r\n")); break;
case STATUS_SETTING_DISABLED:
printPgmString(PSTR("Grbl setting disabled\r\n")); break;
case STATUS_HARD_LIMIT:
printPgmString(PSTR("Limit triggered <Check and Reset>\r\n")); break;
default:
printInteger(status_code);
printPgmString(PSTR("\r\n"));
@ -141,6 +143,7 @@ void protocol_execute_runtime()
// System alarm. Something has gone wrong. Disable everything until system reset.
if (rt_exec & EXEC_ALARM) {
protocol_status_message(STATUS_HARD_LIMIT);
while (bit_isfalse(sys.execute,EXEC_RESET)) { sleep_mode(); }
bit_false(sys.execute,EXEC_ALARM);
}