From c32e8a5e3c44d3d8c0b85f6ab560e3ecb7a65ff5 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Wed, 23 Jun 2021 14:16:04 -1000 Subject: [PATCH] Report limit pin before setting it up so that, if the setup fails, you have a clue about which one. --- Grbl_Esp32/src/Limits.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Grbl_Esp32/src/Limits.cpp b/Grbl_Esp32/src/Limits.cpp index bed58a1e..c508ca73 100644 --- a/Grbl_Esp32/src/Limits.cpp +++ b/Grbl_Esp32/src/Limits.cpp @@ -308,6 +308,8 @@ void limits_init() { } Pin& pin = gangConfig->_endstops->_dual; + info_serial("%s limit on %s", reportAxisNameMsg(axis, gang_index), pin.name().c_str()); + pin.setAttr(Pin::Attr::Input | Pin::Attr::ISR); bitnum_true(limit_mask, axis); if (gangConfig->_endstops->_hardLimits) { @@ -315,8 +317,6 @@ void limits_init() { } else { pin.detachInterrupt(); } - - info_serial("%s limit on %s", reportAxisNameMsg(axis, gang_index), pin.name().c_str()); } } }