Commit f4491115 authored by Guillaume Seguin's avatar Guillaume Seguin

Cleanup gcoder

This construct "current_x = x or current_x" was not correctly handling
cases where x could be 0 and current_x None, and current_x still be None
after the statement while it should have been 0.
parent e6eb66ea
......@@ -218,9 +218,9 @@ class GCode(object):
if y is not None: y = y + offset_y
if z is not None: z = z + offset_z
current_x = x or current_x
current_y = y or current_y
current_z = z or current_z
if x is not None: current_x = x
if y is not None: current_y = y
if z is not None: current_z = z
elif line.command == "G28":
if not any([line.x, line.y, line.z]):
......
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