mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
probe: Support activate/deactivate scripts on each probe
Allow a set of g-code scripts to be run on each probe invocation. This may be useful for probes that need to be setup before they are useful (eg, with servo actuated probes). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3001a089c0
commit
e38c7df064
4 changed files with 43 additions and 0 deletions
|
@ -42,6 +42,8 @@ class Homing:
|
|||
return dist_ticks / ticks_per_step
|
||||
def homing_move(self, movepos, endstops, speed, probe_pos=False):
|
||||
# Start endstop checking
|
||||
for mcu_endstop, name in endstops:
|
||||
mcu_endstop.home_prepare()
|
||||
print_time = self.toolhead.get_last_move_time()
|
||||
for mcu_endstop, name in endstops:
|
||||
min_step_dist = min([s.get_step_dist()
|
||||
|
@ -70,6 +72,8 @@ class Homing:
|
|||
list(self.toolhead.get_kinematics().get_position()) + [None])
|
||||
else:
|
||||
self.toolhead.set_position(movepos)
|
||||
for mcu_endstop, name in endstops:
|
||||
mcu_endstop.home_finalize()
|
||||
if error is not None:
|
||||
raise EndstopError(error)
|
||||
def home(self, forcepos, movepos, endstops, speed, second_home=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue