bltouch: Attempt to verify that the probe raises after each probe attempt

Query the bltouch state during the pin_up command to try and verify
that the probe does actually retract.  This may be useful to detect if
the bltouch enters into an "error" state.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-01-04 20:20:02 -05:00
parent 99f96f2832
commit e36122797b
3 changed files with 31 additions and 15 deletions

View File

@@ -181,7 +181,8 @@ class MCU_endstop:
, self._oid)
def home_prepare(self):
pass
def home_start(self, print_time, sample_time, sample_count, rest_time):
def home_start(self, print_time, sample_time, sample_count, rest_time,
triggered=True):
clock = self._mcu.print_time_to_clock(print_time)
rest_ticks = int(rest_time * self._mcu.get_adjusted_freq())
self._homing = True
@@ -189,7 +190,8 @@ class MCU_endstop:
self._next_query_print_time = print_time + self.RETRY_QUERY
self._home_cmd.send(
[self._oid, clock, self._mcu.seconds_to_clock(sample_time),
sample_count, rest_ticks, 1 ^ self._invert], reqclock=clock)
sample_count, rest_ticks, triggered ^ self._invert],
reqclock=clock)
for s in self._steppers:
s.note_homing_start(clock)
def home_wait(self, home_end_time):