diff options
author | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-24 16:52:43 +0300 |
---|---|---|
committer | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-24 16:56:06 +0300 |
commit | 9bcae15d3935e513ab4d99fcabb45a3836420971 (patch) | |
tree | ce4df467a74918d35a8ab6a1fa630d382cc072db /plugins/GCodeReader | |
parent | efafc37e4905eacb78c1caad95e0a283754f0635 (diff) |
lil: optimize parsing gcode arg letter
CURA-7066
Diffstat (limited to 'plugins/GCodeReader')
-rw-r--r-- | plugins/GCodeReader/FlavorParser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index fce92a14b1..7b19fdb160 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -264,13 +264,13 @@ class FlavorParser: try: if item[0] == "X": x = float(item[1:]) - if item[0] == "Y": + elif item[0] == "Y": y = float(item[1:]) - if item[0] == "Z": + elif item[0] == "Z": z = float(item[1:]) - if item[0] == "F": + elif item[0] == "F": f = float(item[1:]) / 60 - if item[0] == "E": + elif item[0] == "E": e = float(item[1:]) except ValueError: # Improperly formatted g-code: Coordinates are not floats. continue # Skip the command then. |