Level Corners with Probe option (#20241)

This commit is contained in:
wmariz
2020-11-26 10:58:19 -03:00
committed by GitHub
parent 3ba374a29e
commit 58ac815822
11 changed files with 211 additions and 69 deletions

View File

@@ -31,6 +31,7 @@ BLTouch bltouch;
bool BLTouch::last_written_mode; // Initialized by settings.load, 0 = Open Drain; 1 = 5V Drain
#include "../module/servo.h"
#include "../module/probe.h"
void stop();
@@ -90,15 +91,7 @@ void BLTouch::clear() {
_stow(); // STOW to be ready for meaningful work. Could fail, don't care
}
bool BLTouch::triggered() {
return (
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING
#else
READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING
#endif
);
}
bool BLTouch::triggered() { return PROBE_TRIGGERED(); }
bool BLTouch::deploy_proc() {
// Do a DEPLOY