Commit 185b96fa authored by Guillaume Seguin's avatar Guillaume Seguin

Fix #545: don't recompute ETA drift before doing significant moves

This simple workaround should simply ignore initial layers with little
to no movements, and thus avoid M190/M109 to destroy ETA prediction.
parent 23e7c661
......@@ -137,7 +137,7 @@ class RemainingTimeEstimator(object):
def update_layer(self, layer, printtime):
self.previous_layers_estimate += self.current_layer_estimate
if self.previous_layers_estimate > 0 and printtime > 0:
if self.previous_layers_estimate > 1. and printtime > 1.:
self.drift = printtime / self.previous_layers_estimate
self.current_layer_estimate = self.gcode.all_layers[layer].duration
self.current_layer_lines = len(self.gcode.all_layers[layer])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment