mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-08 07:27:43 -06:00
gcode: Rework endstop query to use greenlets
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ed9d7e4fae
commit
a6de1db94d
7 changed files with 23 additions and 47 deletions
|
@ -345,10 +345,13 @@ class GCodeParser:
|
|||
# Get Endstop Status
|
||||
if self.is_fileinput:
|
||||
return
|
||||
print_time = self.toolhead.get_last_move_time()
|
||||
query_state = homing.QueryEndstops(print_time, self.respond)
|
||||
self.toolhead.query_endstops(query_state)
|
||||
self.set_busy(query_state)
|
||||
try:
|
||||
res = self.toolhead.query_endstops()
|
||||
except self.printer.mcu.error, e:
|
||||
self.respond_error(str(e))
|
||||
return
|
||||
self.respond(" ".join(["%s:%s" % (name, ["open", "TRIGGERED"][not not t])
|
||||
for name, t in res]))
|
||||
cmd_PID_TUNE_help = "Run PID Tuning"
|
||||
cmd_PID_TUNE_aliases = ["M303"]
|
||||
def cmd_PID_TUNE(self, params):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue