diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-09-13 12:06:08 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-19 17:22:29 -0400 |
commit | b9586bad18971c41bcd0d8b8d8c84e366fa08e51 (patch) | |
tree | d6b429c4b938874a2db6baa751c5a5e38f4826bf /klippy/heater.py | |
parent | f1c2f789b65810d258d9f870685acb0c7ee5b8dd (diff) | |
download | kutter-b9586bad18971c41bcd0d8b8d8c84e366fa08e51.tar.gz kutter-b9586bad18971c41bcd0d8b8d8c84e366fa08e51.tar.xz kutter-b9586bad18971c41bcd0d8b8d8c84e366fa08e51.zip |
mcu: Use is_fileoutput() externally
Use mcu.is_fileoutput() instead of looking up the "debugoutput" flag
in the start args.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r-- | klippy/heater.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/heater.py b/klippy/heater.py index 11f88107..9dd48b19 100644 --- a/klippy/heater.py +++ b/klippy/heater.py @@ -113,8 +113,6 @@ class PrinterHeater: self.min_extrude_temp = config.getfloat( 'min_extrude_temp', 170., minval=self.min_temp, maxval=self.max_temp) self.max_power = config.getfloat('max_power', 1., above=0., maxval=1.) - is_fileoutput = printer.get_start_args().get('debugoutput') is not None - self.can_extrude = self.min_extrude_temp <= 0. or is_fileoutput self.lock = threading.Lock() self.last_temp = 0. self.last_temp_time = 0. @@ -134,6 +132,8 @@ class PrinterHeater: self.mcu_adc.setup_minmax(SAMPLE_TIME, SAMPLE_COUNT, minval=min(adc_range), maxval=max(adc_range)) self.mcu_adc.setup_adc_callback(REPORT_TIME, self.adc_callback) + is_fileoutput = self.mcu_adc.get_mcu().is_fileoutput() + self.can_extrude = self.min_extrude_temp <= 0. or is_fileoutput self.control = algo(self, config) # pwm caching self.next_pwm_time = 0. |