temperature_mcu: Improve handling when in debug output mode

Call mcu_adc.setup_minmax() even in debug output mode so that the
debugging output contains a more accurate configuration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-01-24 15:28:16 -05:00
parent 04179f3eae
commit bded15b743
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ class PrinterTemperatureMCU:
query_adc.register_adc(config.get_name(), self.mcu_adc)
# Register callbacks
if self.printer.get_start_args().get('debugoutput') is not None:
self.mcu_adc.setup_minmax(SAMPLE_TIME, SAMPLE_COUNT,
range_check_count=RANGE_CHECK_COUNT)
return
self.printer.register_event_handler("klippy:mcu_identify",
self._mcu_identify)