diff --git a/Grbl_Esp32/src/Probe.cpp b/Grbl_Esp32/src/Probe.cpp index 661c2d84..dcb57e64 100644 --- a/Grbl_Esp32/src/Probe.cpp +++ b/Grbl_Esp32/src/Probe.cpp @@ -50,7 +50,7 @@ void set_probe_direction(bool is_away) { // Returns the probe pin state. Triggered = true. Called by gcode parser and probe state monitor. bool probe_get_state() { - return digitalRead(PROBE_PIN) ^ probe_invert->get(); + return (PROBE_PIN == UNDEFINED_PIN) ? false : digitalRead(PROBE_PIN) ^ probe_invert->get(); } // Monitors probe pin state and records the system position when detected. Called by the