aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-08-15 16:07:07 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-08-20 21:03:22 -0400
commit80a6f59c8f4549e80aeac0b20ed3a648b284e447 (patch)
treebd3a586aae625d12d8a88a6162ec2dedae1816fb /klippy/extras
parent2d5f9b6cdac98fec56afb9cdca37ad7ac2795fd6 (diff)
downloadkutter-80a6f59c8f4549e80aeac0b20ed3a648b284e447.tar.gz
kutter-80a6f59c8f4549e80aeac0b20ed3a648b284e447.tar.xz
kutter-80a6f59c8f4549e80aeac0b20ed3a648b284e447.zip
gcode: Convert get_status() last_xpos to use a namedtuple
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/print_stats.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/extras/print_stats.py b/klippy/extras/print_stats.py
index 7d6dd718..1a3fcb22 100644
--- a/klippy/extras/print_stats.py
+++ b/klippy/extras/print_stats.py
@@ -12,7 +12,7 @@ class PrintStats:
self.reset()
def _update_filament_usage(self, eventtime):
gc_status = self.gcode.get_status(eventtime)
- cur_epos = gc_status['last_epos']
+ cur_epos = gc_status['position'].e
self.filament_used += (cur_epos - self.last_epos) \
/ gc_status['extrude_factor']
self.last_epos = cur_epos
@@ -30,7 +30,7 @@ class PrintStats:
self.last_pause_time = None
# Reset last e-position
gc_status = self.gcode.get_status(curtime)
- self.last_epos = gc_status['last_epos']
+ self.last_epos = gc_status['position'].e
self.state = "printing"
self.error_message = ""
def note_pause(self):