From 1d276d160f6899c948f8ed37ceb6a7566cefd485 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 21 Dec 2017 22:23:07 -0500 Subject: [PATCH] gcode: Dump internal g-code state in dump_debug() Signed-off-by: Kevin O'Connor --- klippy/gcode.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/klippy/gcode.py b/klippy/gcode.py index 0f97cfc0..b398a116 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -101,6 +101,13 @@ class GCodeParser: len(self.input_log),)) for eventtime, data in self.input_log: 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)) # Parse input into commands args_r = re.compile('([A-Z_]+|[A-Z*])')