mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
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:
parent
9fa0fb1a0e
commit
d89722056b
7 changed files with 24 additions and 25 deletions
|
@ -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)
|
||||
|
||||
|
||||
######################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue