Commit 086bb290 authored by Guillaume Seguin's avatar Guillaume Seguin

Don't assume a Nlinenumber means there is a valid command after

parent 97fd4c01
...@@ -76,12 +76,14 @@ def P(line): ...@@ -76,12 +76,14 @@ def P(line):
def split(line): def split(line):
split_raw = gcode_exp.findall(line.raw.lower()) split_raw = gcode_exp.findall(line.raw.lower())
if split_raw and split_raw[0][0] == "n":
del split_raw[0]
if not split_raw: if not split_raw:
line.command = line.raw line.command = line.raw
line.is_move = False line.is_move = False
logging.warning("raw G-Code line \"%s\" could not be parsed" % line.raw) logging.warning("raw G-Code line \"%s\" could not be parsed" % line.raw)
return [line.raw] return [line.raw]
command = split_raw[0] if split_raw[0][0] != "n" else split_raw[1] command = split_raw[0]
line.command = command[0].upper() + command[1] line.command = command[0].upper() + command[1]
line.is_move = line.command in move_gcodes line.is_move = line.command in move_gcodes
return split_raw return split_raw
......
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