diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-06-26 10:45:06 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-07-10 10:43:20 -0400 |
commit | b2c778b93122aacd93b983775c10b97d392e92b4 (patch) | |
tree | 247370860c7be3de3511561ccff3d597d40f7d4d /klippy/mcu.py | |
parent | ced5e35f0c37991c13e4a607369c20edd02b5761 (diff) | |
download | kutter-b2c778b93122aacd93b983775c10b97d392e92b4.tar.gz kutter-b2c778b93122aacd93b983775c10b97d392e92b4.tar.xz kutter-b2c778b93122aacd93b983775c10b97d392e92b4.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/mcu.py')
-rw-r--r-- | klippy/mcu.py | 4 |
1 files changed, 1 insertions, 3 deletions
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 |