Added misc message to indicate how to exit ALARM mode.
This commit is contained in:
parent
065ceceb34
commit
5d8c3dcbd7
@ -60,7 +60,7 @@ void protocol_status_message(uint8_t status_code)
|
|||||||
case STATUS_INVALID_STATEMENT:
|
case STATUS_INVALID_STATEMENT:
|
||||||
printPgmString(PSTR("Invalid statement")); break;
|
printPgmString(PSTR("Invalid statement")); break;
|
||||||
case STATUS_HARD_LIMIT:
|
case STATUS_HARD_LIMIT:
|
||||||
printPgmString(PSTR("<ALARM> Limit triggered")); break;
|
printPgmString(PSTR("Limit triggered")); break;
|
||||||
case STATUS_SETTING_DISABLED:
|
case STATUS_SETTING_DISABLED:
|
||||||
printPgmString(PSTR("Grbl setting disabled")); break;
|
printPgmString(PSTR("Grbl setting disabled")); break;
|
||||||
case STATUS_SETTING_STEPS_NEG:
|
case STATUS_SETTING_STEPS_NEG:
|
||||||
@ -77,13 +77,15 @@ void protocol_status_message(uint8_t status_code)
|
|||||||
|
|
||||||
// Prints miscellaneous messages. This serves as a centralized method to provide additional
|
// Prints miscellaneous messages. This serves as a centralized method to provide additional
|
||||||
// user feedback for things that do not pass through the protocol_execute_line() function
|
// user feedback for things that do not pass through the protocol_execute_line() function
|
||||||
// and are not errors or confirmations, such as setup warnings.
|
// and are not errors or confirmations, such as setup warnings and how to exit alarms.
|
||||||
void protocol_misc_message(uint8_t message_code)
|
void protocol_misc_message(uint8_t message_code)
|
||||||
{
|
{
|
||||||
// TODO: Install silence misc messages option in settings
|
// TODO: Install silence misc messages option in settings
|
||||||
switch(message_code) {
|
switch(message_code) {
|
||||||
|
case MESSAGE_SYSTEM_ALARM:
|
||||||
|
printPgmString(PSTR("<ALARM: Reset to continue>")); break;
|
||||||
case MESSAGE_HOMING_ENABLE:
|
case MESSAGE_HOMING_ENABLE:
|
||||||
printPgmString(PSTR("warning: Install all axes limit switches before use")); break;
|
printPgmString(PSTR("warning: Install all axes limit switches before use")); break;
|
||||||
}
|
}
|
||||||
printPgmString(PSTR("\r\n"));
|
printPgmString(PSTR("\r\n"));
|
||||||
}
|
}
|
||||||
@ -167,6 +169,7 @@ void protocol_execute_runtime()
|
|||||||
|
|
||||||
// System alarm. Something has gone wrong. Disable everything until system reset.
|
// System alarm. Something has gone wrong. Disable everything until system reset.
|
||||||
if (rt_exec & EXEC_ALARM) {
|
if (rt_exec & EXEC_ALARM) {
|
||||||
|
if (bit_isfalse(sys.execute,EXEC_RESET)) { protocol_misc_message(MESSAGE_SYSTEM_ALARM); }
|
||||||
while (bit_isfalse(sys.execute,EXEC_RESET)) { sleep_mode(); }
|
while (bit_isfalse(sys.execute,EXEC_RESET)) { sleep_mode(); }
|
||||||
bit_false(sys.execute,EXEC_ALARM);
|
bit_false(sys.execute,EXEC_ALARM);
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#define STATUS_SETTING_READ_FAIL 11
|
#define STATUS_SETTING_READ_FAIL 11
|
||||||
|
|
||||||
// Define Grbl misc message codes
|
// Define Grbl misc message codes
|
||||||
|
#define MESSAGE_SYSTEM_ALARM 0
|
||||||
#define MESSAGE_HOMING_ENABLE 1
|
#define MESSAGE_HOMING_ENABLE 1
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user