aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/adc_temperature.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-06-18 13:01:34 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-06-21 15:32:30 -0400
commitd89722056bf58103dc7fc06bc310ac39afa6aaa0 (patch)
tree7a758d84365dce6ad210a0263d0ad702d9901c20 /klippy/extras/adc_temperature.py
parent9fa0fb1a0ebca3ed4be887417b255b26fc99bbfd (diff)
downloadkutter-d89722056bf58103dc7fc06bc310ac39afa6aaa0.tar.gz
kutter-d89722056bf58103dc7fc06bc310ac39afa6aaa0.tar.xz
kutter-d89722056bf58103dc7fc06bc310ac39afa6aaa0.zip
mcu: Rename setup_minmax() to setup_adc_sample()
Rename this method so that it is more distinct from the the common temperature setup_minmax() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/adc_temperature.py')
-rw-r--r--klippy/extras/adc_temperature.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/extras/adc_temperature.py b/klippy/extras/adc_temperature.py
index b76e8c66..260fe281 100644
--- a/klippy/extras/adc_temperature.py
+++ b/klippy/extras/adc_temperature.py
@@ -32,10 +32,10 @@ class PrinterADCtoTemperature:
temp = self.adc_convert.calc_temp(read_value)
self.temperature_callback(read_time + SAMPLE_COUNT * SAMPLE_TIME, temp)
def setup_minmax(self, min_temp, max_temp):
- adc_range = [self.adc_convert.calc_adc(t) for t in [min_temp, max_temp]]
- self.mcu_adc.setup_minmax(SAMPLE_TIME, SAMPLE_COUNT,
- minval=min(adc_range), maxval=max(adc_range),
- range_check_count=RANGE_CHECK_COUNT)
+ arange = [self.adc_convert.calc_adc(t) for t in [min_temp, max_temp]]
+ self.mcu_adc.setup_adc_sample(SAMPLE_TIME, SAMPLE_COUNT,
+ minval=min(arange), maxval=max(arange),
+ range_check_count=RANGE_CHECK_COUNT)
######################################################################