Add alarm details and only rerender status when it changes

This commit is contained in:
2023-04-28 16:08:05 +03:00
parent 30ccb20846
commit 0b8f5a6950
4 changed files with 55 additions and 18 deletions
+2 -2
View File
@@ -121,9 +121,9 @@ std::string grbl::status_to_string(const grbl::machine_status& status) {
std::string grbl::alarm_to_string(int alarm) {
switch (alarm) {
case 1:
return "Hard limit has been triggered. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.";
return "Hard limit has been triggered.\nMachine position is likely lost due to sudden halt.\nRe-homing is highly recommended.";
case 2:
return "Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained. Alarm may be safely unlocked.";
return "Soft limit alarm. G-code motion target exceeds\nmachine travel. Machine position retained.\nAlarm may be safely unlocked.";
case 3:
return "Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.";
case 4: