Skip to content

Commit

Permalink
Update temperature_mcu.py (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeanon authored Dec 23, 2024
1 parent ccfb8f4 commit 3488caf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions klippy/extras/temperature_mcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def __init__(self, config):
range_check_count=self._danger_check_count,
)
return
self.printer.register_event_handler(
"klippy:mcu_identify", self._mcu_identify
)
self.mcu_adc.get_mcu().register_config_callback(self._build_config)

def setup_callback(self, temperature_callback):
Expand All @@ -80,9 +77,6 @@ def calc_adc(self, temp):
def calc_base(self, temp, adc):
return temp - adc * self.slope

def _mcu_identify(self):
self._build_config()

def _build_config(self):
# Obtain mcu information
_mcu = self.mcu_adc.get_mcu()
Expand Down Expand Up @@ -136,6 +130,7 @@ def _build_config(self):
maxval=max(adc_range),
range_check_count=self._danger_check_count,
)
self.mcu_adc._build_config()

def config_unknown(self):
raise self.printer.config_error(
Expand Down

0 comments on commit 3488caf

Please sign in to comment.