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:
parent
48ddfba415
commit
f7f78433a2
|
@ -96,7 +96,22 @@ class GCodeParser:
|
||||||
return False, "gcodein=%d" % (self.bytes_read,)
|
return False, "gcodein=%d" % (self.bytes_read,)
|
||||||
def get_status(self, eventtime):
|
def get_status(self, eventtime):
|
||||||
busy = self.is_processing_data
|
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):
|
def printer_state(self, state):
|
||||||
if state == 'shutdown':
|
if state == 'shutdown':
|
||||||
if not self.is_printer_ready:
|
if not self.is_printer_ready:
|
||||||
|
|
Loading…
Reference in New Issue