gcodeToEvent can only fire one event per gcode function anyway. <1% performance increase.
parent
b5661c6f5e
commit
715eb142f8
|
@ -914,9 +914,9 @@ class MachineCom(object):
|
||||||
gfunc = re.search('([GM][0-9]+)', cmd)
|
gfunc = re.search('([GM][0-9]+)', cmd)
|
||||||
if gfunc:
|
if gfunc:
|
||||||
gfunc = gfunc.group(1)
|
gfunc = gfunc.group(1)
|
||||||
for gcode in gcodeToEvent.keys():
|
|
||||||
if gcode == gfunc:
|
if gfunc in gcodeToEvent:
|
||||||
eventManager().fire(gcodeToEvent[gcode])
|
eventManager().fire(gcodeToEvent[gfunc])
|
||||||
|
|
||||||
if (gfunc == "G0" or gfunc == "G1") and 'Z' in cmd:
|
if (gfunc == "G0" or gfunc == "G1") and 'Z' in cmd:
|
||||||
z = float(re.search('Z([0-9\.]*)', cmd).group(1))
|
z = float(re.search('Z([0-9\.]*)', cmd).group(1))
|
||||||
|
|
Loading…
Reference in New Issue