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>
This commit is contained in:
Kevin O'Connor 2024-06-18 13:01:34 -04:00
parent 9fa0fb1a0e
commit d89722056b
7 changed files with 24 additions and 25 deletions

View file

@ -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)
######################################################################