1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 17:49:56 +02:00

Added ConfigAlarm to listAlarms. Fixed a bug of ConfigAlarm triggered incorrectly.

This commit is contained in:
Stefan de Bruijn
2021-07-01 21:03:39 +02:00
parent c1baa2f4c8
commit 9f123f0f3e
2 changed files with 5 additions and 2 deletions

View File

@@ -400,7 +400,7 @@ void mc_homing_cycle(AxisMask axis_mask) {
}
if (!someAxisHomed) {
report_status_message(Error::HomingNoCycles, CLIENT_ALL);
sys.state = State::ConfigAlarm;
sys.state = State::Alarm;
return;
}
}

View File

@@ -383,7 +383,10 @@ const char* alarmString(ExecAlarm alarmNumber) {
}
Error listAlarms(const char* value, WebUI::AuthenticationLevel auth_level, WebUI::ESPResponseStream* out) {
if (sys_rt_exec_alarm != ExecAlarm::None) {
if (sys.state == State::ConfigAlarm) {
grbl_sendf(out->client(), "Configuration alarm is active. Check the boot messages for 'ERR'.\r\n");
}
else if (sys_rt_exec_alarm != ExecAlarm::None) {
grbl_sendf(out->client(), "Active alarm: %d (%s)\r\n", int(sys_rt_exec_alarm), alarmString(sys_rt_exec_alarm));
}
if (value) {