toolhead: Avoid directly accessing the printer.mcu field

Lookup the mcu object from the printer objects and store it locally in
the toolhead class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-08-26 00:04:48 -04:00
parent 68ba3d5106
commit a42cb4fecf
2 changed files with 15 additions and 12 deletions

View file

@ -429,7 +429,7 @@ class GCodeParser:
return
try:
res = self.toolhead.query_endstops()
except self.printer.mcu.error as e:
except homing.EndstopError as e:
self.respond_error(str(e))
return
self.respond(" ".join(["%s:%s" % (name, ["open", "TRIGGERED"][not not t])