Commit 5649eee8 authored by Guillaume Seguin's avatar Guillaume Seguin

Fix scoping bug in new GCodeAnalyzer

parent 720eae92
......@@ -69,10 +69,8 @@ class GCodeAnalyzer():
def Analyze(self, gcode):
gline = gcoder.Line(gcode)
if gline.command.startswith(";@"): return # code is a host command
if gline.command.startswith("G"):
code_g = int(gline.command[1:])
if gline.command.startswith("M"):
code_m = int(gline.command[1:])
code_g = int(gline.command[1:]) if gline.command.startswith("G") else None
code_m = int(gline.command[1:]) if gline.command.startswith("M") else None
#get movement codes
if gline.is_move:
......
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