From 5b572c167fcfa3b8fd7b1bd34b312b76ba46490b Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Sat, 18 May 2013 23:09:49 +0200 Subject: [PATCH] Compute duration estimation across all actual layers for correctness This also matters as those actual layers are what we will use for ETA --- printrun/gcoder.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/printrun/gcoder.py b/printrun/gcoder.py index c3ac88d..cc838e1 100755 --- a/printrun/gcoder.py +++ b/printrun/gcoder.py @@ -288,10 +288,7 @@ class GCode(object): #TODO: # get device caps from firmware: max speed, acceleration/axis (including extruder) # calculate the maximum move duration accounting for above ;) - zs = self.layers.keys() - zs.sort() - for z in zs: - layer = self.layers[z] + for layer in self.all_layers: for line in layer.lines: if line.command not in ["G1", "G0", "G4"]: continue