mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 15:07:33 -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
|
@ -168,6 +168,8 @@ class MCU_endstop:
|
|||
self._query_cmd = self._mcu.lookup_command("end_stop_query oid=%c")
|
||||
self._mcu.register_msg(self._handle_end_stop_state, "end_stop_state"
|
||||
, self._oid)
|
||||
def home_prepare(self):
|
||||
pass
|
||||
def home_start(self, print_time, sample_time, sample_count, rest_time):
|
||||
clock = self._mcu.print_time_to_clock(print_time)
|
||||
rest_ticks = int(rest_time * self._mcu.get_adjusted_freq())
|
||||
|
@ -184,6 +186,8 @@ class MCU_endstop:
|
|||
eventtime = self._mcu.monotonic()
|
||||
while self._check_busy(eventtime, home_end_time):
|
||||
eventtime = self._mcu.pause(eventtime + 0.1)
|
||||
def home_finalize(self):
|
||||
pass
|
||||
def _handle_end_stop_state(self, params):
|
||||
logging.debug("end_stop_state %s", params)
|
||||
self._last_state = params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue