mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 23:17:37 -06:00
homing: Directly interact with the kinematic class on query_endstops()
Move the query_endstop logic out of toolhead.py and into homing.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8d9ca6f2dd
commit
f6d4284d5c
6 changed files with 15 additions and 21 deletions
|
@ -409,7 +409,7 @@ class GCodeParser:
|
|||
if self.toolhead is None:
|
||||
self.cmd_default(params)
|
||||
return
|
||||
raw_pos = self.toolhead.query_endstops("get_mcu_position")
|
||||
raw_pos = homing.query_position(self.toolhead)
|
||||
self.respond("X:%.3f Y:%.3f Z:%.3f E:%.3f Count %s" % (
|
||||
self.last_position[0], self.last_position[1],
|
||||
self.last_position[2], self.last_position[3],
|
||||
|
@ -451,12 +451,7 @@ class GCodeParser:
|
|||
cmd_QUERY_ENDSTOPS_aliases = ["M119"]
|
||||
def cmd_QUERY_ENDSTOPS(self, params):
|
||||
# Get Endstop Status
|
||||
if self.is_fileinput:
|
||||
return
|
||||
try:
|
||||
res = self.toolhead.query_endstops()
|
||||
except homing.EndstopError as e:
|
||||
raise error(str(e))
|
||||
res = homing.query_endstops(self.toolhead)
|
||||
self.respond(" ".join(["%s:%s" % (name, ["open", "TRIGGERED"][not not t])
|
||||
for name, t in res]))
|
||||
cmd_PID_TUNE_help = "Run PID Tuning"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue