mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 04:54:11 -06:00
query_endstops: Move QUERY_ENDSTOP command to it own extras/ module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
28fa954487
commit
89835940f7
5 changed files with 47 additions and 23 deletions
|
@ -116,18 +116,6 @@ class Homing:
|
|||
self.toolhead.motor_off()
|
||||
raise
|
||||
|
||||
def query_endstops(toolhead):
|
||||
print_time = toolhead.get_last_move_time()
|
||||
rails = toolhead.get_kinematics().get_rails()
|
||||
out = []
|
||||
for rail in rails:
|
||||
for mcu_endstop, name in rail.get_endstops():
|
||||
mcu_endstop.query_endstop(print_time)
|
||||
for rail in rails:
|
||||
for mcu_endstop, name in rail.get_endstops():
|
||||
out.append((name, mcu_endstop.query_endstop_wait()))
|
||||
return out
|
||||
|
||||
class EndstopError(Exception):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue