aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-04-24 23:06:07 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-05-05 11:08:12 -0400
commit7232014657ed9ab7519d0698e4beaf7b50f275a2 (patch)
tree0ce1b2c3f69170382a0da3eafc21cd4106de10c3
parentd04476c82edb24e585c348c2f5e3c1d0f2c52339 (diff)
downloadkutter-7232014657ed9ab7519d0698e4beaf7b50f275a2.tar.gz
kutter-7232014657ed9ab7519d0698e4beaf7b50f275a2.tar.xz
kutter-7232014657ed9ab7519d0698e4beaf7b50f275a2.zip
query_endstops: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/extras/query_endstops.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/klippy/extras/query_endstops.py b/klippy/extras/query_endstops.py
index f4bcbd81..7209ca65 100644
--- a/klippy/extras/query_endstops.py
+++ b/klippy/extras/query_endstops.py
@@ -18,7 +18,7 @@ class QueryEndstops:
def get_status(self, eventtime):
return {'last_query': {name: value for name, value in self.last_state}}
cmd_QUERY_ENDSTOPS_help = "Report on the status of each endstop"
- def cmd_QUERY_ENDSTOPS(self, params):
+ def cmd_QUERY_ENDSTOPS(self, gcmd):
# Query the endstops
print_time = self.printer.lookup_object('toolhead').get_last_move_time()
self.last_state = [(name, mcu_endstop.query_endstop(print_time))
@@ -26,8 +26,7 @@ class QueryEndstops:
# Report results
msg = " ".join(["%s:%s" % (name, ["open", "TRIGGERED"][not not t])
for name, t in self.last_state])
- gcode = self.printer.lookup_object('gcode')
- gcode.respond_raw(msg)
+ gcmd.respond_raw(msg)
def load_config(config):
return QueryEndstops(config)