From 7232014657ed9ab7519d0698e4beaf7b50f275a2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 24 Apr 2020 23:06:07 -0400 Subject: [PATCH] query_endstops: Use new GCodeCommand wrappers Signed-off-by: Kevin O'Connor --- klippy/extras/query_endstops.py | 5 ++--- 1 file 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)