From b2c778b93122aacd93b983775c10b97d392e92b4 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 26 Jun 2019 10:45:06 -0400 Subject: mcu: Integrate query_endstop_wait() into query_endstop() There is no need to have two separate calls to query an endstop. Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index bc5e046b..2d8a9b55 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -234,10 +234,8 @@ class MCU_endstop: return True def query_endstop(self, print_time): self._homing = False - self._min_query_time = self._mcu.monotonic() + self._min_query_time = eventtime = self._mcu.monotonic() self._next_query_print_time = print_time - def query_endstop_wait(self): - eventtime = self._mcu.monotonic() while self._check_busy(eventtime): eventtime = self._mcu.pause(eventtime + 0.1) return self._last_state.get('pin_value', self._invert) ^ self._invert -- cgit v1.2.3-70-g09d2