From bded15b7437e5807831128ae2a043b3194cc571e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 24 Jan 2021 15:28:16 -0500 Subject: [PATCH] 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 --- klippy/extras/temperature_mcu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/extras/temperature_mcu.py b/klippy/extras/temperature_mcu.py index 7a3865dc..1a1510da 100644 --- a/klippy/extras/temperature_mcu.py +++ b/klippy/extras/temperature_mcu.py @@ -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)