gcode: Make it clear that gcode.get_status() can be called without eventtime
Make it clear that gcode.get_status() to be called without an eventtime by defaulting eventtime=None. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ceaf818a11
commit
1ab41cf41d
|
@ -22,7 +22,7 @@ class ArcSupport:
|
||||||
self.gcode.register_command("G3", self.cmd_G2)
|
self.gcode.register_command("G3", self.cmd_G2)
|
||||||
|
|
||||||
def cmd_G2(self, gcmd):
|
def cmd_G2(self, gcmd):
|
||||||
gcodestatus = self.gcode.get_status(None)
|
gcodestatus = self.gcode.get_status()
|
||||||
if not gcodestatus['absolute_coordinates']:
|
if not gcodestatus['absolute_coordinates']:
|
||||||
raise self.gcode.error("G2/G3 does not support relative move mode")
|
raise self.gcode.error("G2/G3 does not support relative move mode")
|
||||||
currentPos = gcodestatus['gcode_position']
|
currentPos = gcodestatus['gcode_position']
|
||||||
|
|
|
@ -58,7 +58,7 @@ class TuningTower:
|
||||||
self.end_test()
|
self.end_test()
|
||||||
else:
|
else:
|
||||||
# Process update
|
# Process update
|
||||||
z_offset = self.gcode.get_status(None)['base_zpos']
|
z_offset = self.gcode.get_status()['base_zpos']
|
||||||
oldval = self.calc_value(self.last_z - z_offset)
|
oldval = self.calc_value(self.last_z - z_offset)
|
||||||
newval = self.calc_value(z - z_offset)
|
newval = self.calc_value(z - z_offset)
|
||||||
self.last_z = z
|
self.last_z = z
|
||||||
|
|
|
@ -190,7 +190,7 @@ class GCodeParser:
|
||||||
return self.speed / self.speed_factor
|
return self.speed / self.speed_factor
|
||||||
def _get_gcode_speed_override(self):
|
def _get_gcode_speed_override(self):
|
||||||
return self.speed_factor * 60.
|
return self.speed_factor * 60.
|
||||||
def get_status(self, eventtime):
|
def get_status(self, eventtime=None):
|
||||||
move_position = self._get_gcode_position()
|
move_position = self._get_gcode_position()
|
||||||
busy = self.is_processing_data
|
busy = self.is_processing_data
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue