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

Fix scoping bug in new GCodeAnalyzer

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