heater: Make it possible to disable min_extrude_temp for testing

Allow a config file to specify 'min_extrude_temp: 0' to disable the
minimum extrude temperature test.  This makes it easier to perform
testing on the avr simulator.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-10-11 00:00:10 -04:00
parent ee56b14faa
commit 7f8a94ff48
2 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,7 @@ pid_Kp: 22.2
pid_Ki: 1.08 pid_Ki: 1.08
pid_Kd: 114 pid_Kd: 114
min_temp: 0 min_temp: 0
min_extrude_temp: 0
max_temp: 210 max_temp: 210
[heater_bed] [heater_bed]

View File

@ -29,7 +29,7 @@ class PrinterHeater:
self.thermistor_c = Thermistors.get(config.get('thermistor_type')) self.thermistor_c = Thermistors.get(config.get('thermistor_type'))
self.pullup_r = config.getfloat('pullup_resistor', 4700.) self.pullup_r = config.getfloat('pullup_resistor', 4700.)
self.min_extrude_temp = config.getfloat('min_extrude_temp', 170.) self.min_extrude_temp = config.getfloat('min_extrude_temp', 170.)
self.can_extrude = False self.can_extrude = self.min_extrude_temp <= 0.
self.lock = threading.Lock() self.lock = threading.Lock()
self.last_temp = 0. self.last_temp = 0.
self.last_temp_time = 0. self.last_temp_time = 0.