gcode: Dump internal g-code state in dump_debug()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-12-21 22:23:07 -05:00
parent 9313e58123
commit 1d276d160f
1 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,13 @@ class GCodeParser:
len(self.input_log),)) len(self.input_log),))
for eventtime, data in self.input_log: for eventtime, data in self.input_log:
out.append("Read %f: %s" % (eventtime, repr(data))) out.append("Read %f: %s" % (eventtime, repr(data)))
out.append(
"gcode state: absolutecoord=%s absoluteextrude=%s"
" base_position=%s last_position=%s homing_add=%s"
" speed=%s" % (
self.absolutecoord, self.absoluteextrude,
self.base_position, self.last_position, self.homing_add,
self.speed))
logging.info("\n".join(out)) logging.info("\n".join(out))
# Parse input into commands # Parse input into commands
args_r = re.compile('([A-Z_]+|[A-Z*])') args_r = re.compile('([A-Z_]+|[A-Z*])')