Commit 1eee27aa authored by Kliment Yanev's avatar Kliment Yanev

Ignore comments in gcode files when estimating duration

parent 82aa15be
...@@ -94,7 +94,7 @@ def estimate_duration(g): ...@@ -94,7 +94,7 @@ def estimate_duration(g):
feedrate = 0 feedrate = 0
X_last_position = 0 X_last_position = 0
Y_last_position = 0 Y_last_position = 0
for i in g: for i.split(";")[0] in g:
if "G1" in i and ("X" in i or "Y" in i or "F" in i or "E" in i): if "G1" in i and ("X" in i or "Y" in i or "F" in i or "E" in i):
parts = i.split(" ") parts = i.split(" ")
X = get_coordinate_value("X", parts[1:]) X = get_coordinate_value("X", parts[1:])
......
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