+ if getValue(line, 'M', 666) == 107:
+ fanOnCommand = None
+ f.write(line)
+ continue
+ if getValue(line, 'M', 666) == 106:
+ fanOnCommand = line
+ f.write(line)
+ continue
+ # find where the newly activated extruder is unspooled and block until fully reheated
+ if (getValue(line, 'G', 666) == 0 or getValue(line, 'G', 666) == 1) and getValue (line, 'E', 666) == 0.0 and (heatupBlocked or firstLayer):
+ # todo: if wipeTowerP, only
+ # wait for a few degrees below
+ # printTemperature and allow
+ # it to finish heating while
+ # priming
+ if zHop > 0.0:
+ f.write ("G91\nG0 Z%.3f\nG90\n" % zHop)
+
+ disableFan(f)
+ f.write("M109 T%d S%d\n" % (activeExtruder, printTemperature))
+ wipeNozzle(f)
+ enableFan(f)
+
+ if zHop > 0.0:
+ f.write ("G91\nG0 Z%.3f\nG90\n" % -zHop)
+ zHop = -1
+ heatupBlocked = False