mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-28 16:49:54 +02:00
Fix undefined probe reporting if inverted.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user