Commit 262b000f authored by Steven Devijver's avatar Steven Devijver

Removed initial_feedrate, isn't used anyways, will only confuse people

parent 80a1301b
...@@ -91,7 +91,6 @@ def get_coordinate_value(axis, parts): ...@@ -91,7 +91,6 @@ def get_coordinate_value(axis, parts):
def estimate_duration(g): def estimate_duration(g):
extra_cost_per_movement = 0.02 extra_cost_per_movement = 0.02
total_duration = 0 total_duration = 0
initial_feedrate = 0
feedrate = 0 feedrate = 0
X_last_position = 0 X_last_position = 0
Y_last_position = 0 Y_last_position = 0
...@@ -125,9 +124,9 @@ def estimate_duration(g): ...@@ -125,9 +124,9 @@ def estimate_duration(g):
if (feedrate == 0 or distance == 0): continue if (feedrate == 0 or distance == 0): continue
time_for_move = distance / feedrate time_for_move = distance / feedrate
acceleration = (feedrate - initial_feedrate) / time_for_move acceleration = feedrate / time_for_move
halfway_feedrate = initial_feedrate + acceleration * time_for_move / 2 halfway_feedrate = acceleration * time_for_move / 2
duration = (halfway_feedrate * 2 - initial_feedrate) / acceleration duration = halfway_feedrate * 2 / acceleration
total_duration += duration + extra_cost_per_movement total_duration += duration + extra_cost_per_movement
......
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