auto fan turn on

This commit is contained in:
Nikolay Khabarov
2017-07-09 12:29:22 +03:00
parent 328fc21e0b
commit 1738245684
3 changed files with 16 additions and 0 deletions
+3
View File
@@ -89,3 +89,6 @@ INSTANT_RUN = True
# velocity would be decreased(proportional for all axises) to fit the maximum
# velocity.
AUTO_VELOCITY_ADJUSTMENT = True
# Automatically turn on fan when extruder is heating, boolean value.
AUTO_FAN_ON = True
+4
View File
@@ -18,6 +18,8 @@ class GMachine(object):
""" Main object which control and keep state of whole machine: steppers,
spindle, extruder etc
"""
AUTO_FAN_ON = AUTO_FAN_ON
def __init__(self):
""" Initialization.
"""
@@ -85,6 +87,8 @@ class GMachine(object):
self._heaters[heater].stop()
del self._heaters[heater]
if temperature != 0:
if heater == HEATER_EXTRUDER and self.AUTO_FAN_ON:
self._fan(True)
self._heaters[heater] = Heater(temperature, coefficients, measure,
control)
if wait: