From fabfe11269490562256c65803f2e0187a4e54178 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Tue, 6 Jul 2021 22:03:29 -1000 Subject: [PATCH] Fixed ^x problem It was working only the first time, due to code that was added to prevent endless reset loops on asserts. --- Grbl_Esp32/src/Grbl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Grbl_Esp32/src/Grbl.cpp b/Grbl_Esp32/src/Grbl.cpp index a9aab5c8..9cd14d9c 100644 --- a/Grbl_Esp32/src/Grbl.cpp +++ b/Grbl_Esp32/src/Grbl.cpp @@ -195,7 +195,9 @@ void run_once() { error_all("Stacktrace: %s", ex.stackTrace.c_str()); sys.state = State::ConfigAlarm; } - if (++tries > 1) { + // sys.abort is a user-initiated exit via ^x so we don't limit the number of occurrences + if (!sys.abort && ++tries > 1) { + info_serial("Stalling due to too many failures"); while (1) {} } // This is inside a loop in Grbl_Esp32.ino