From e38c7df064845da3ec8146e13ecf399cb37e15d1 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 23 Jan 2018 12:26:18 -0500 Subject: 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 --- klippy/mcu.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index 40fcbad7..06da3ea6 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -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 -- cgit v1.2.3-70-g09d2