From e36122797b0fdf949ff6bedb2f796afe43513577 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 4 Jan 2019 20:20:02 -0500 Subject: 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 --- klippy/mcu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index a0bfc14f..5a00c54c 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -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): -- cgit v1.2.3-70-g09d2