1
0
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:
bdring
2020-12-21 16:55:01 -06:00
parent 83cced5e4c
commit 25dc57c7a2

View File

@@ -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