From f7f78433a2427dbb96c350824f103cf08f1167db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janar=20S=C3=B6=C3=B6t?= Date: Mon, 17 Sep 2018 15:25:28 +0300 Subject: [PATCH] gcode: modify get_status method to output more info (#651) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Janar Sööt --- klippy/gcode.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/klippy/gcode.py b/klippy/gcode.py index 58602304..ee293507 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -96,7 +96,22 @@ class GCodeParser: return False, "gcodein=%d" % (self.bytes_read,) def get_status(self, eventtime): busy = self.is_processing_data - return {'speed_factor': self.speed_factor * 60., 'busy': busy} + return { + 'speed_factor': self.speed_factor * 60., + 'extrude_factor': self.extrude_factor, + 'busy': busy, + 'last_xpos': self.last_position[0], + 'last_ypos': self.last_position[1], + 'last_zpos': self.last_position[2], + 'last_epos': self.last_position[3], + 'base_xpos': self.base_position[0], + 'base_ypos': self.base_position[1], + 'base_zpos': self.base_position[2], + 'base_epos': self.base_position[3], + 'homing_xpos': self.homing_position[0], + 'homing_ypos': self.homing_position[1], + 'homing_zpos': self.homing_position[2] + } def printer_state(self, state): if state == 'shutdown': if not self.is_printer_ready: