gcode: modify get_status method to output more info (#651)

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
Janar Sööt 2018-09-17 15:25:28 +03:00 committed by KevinOConnor
parent 48ddfba415
commit f7f78433a2
1 changed files with 16 additions and 1 deletions

View File

@ -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: