aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/thermistor.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/thermistor.py')
-rw-r--r--klippy/extras/thermistor.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/thermistor.py b/klippy/extras/thermistor.py
index c39ae66e..20c87754 100644
--- a/klippy/extras/thermistor.py
+++ b/klippy/extras/thermistor.py
@@ -75,6 +75,8 @@ class Thermistor:
temp = 1.0/inv_t + KELVIN_TO_CELCIUS
self.temperature_callback(read_time + SAMPLE_COUNT * SAMPLE_TIME, temp)
def calc_adc(self, temp):
+ if temp <= KELVIN_TO_CELCIUS:
+ return 1.
inv_t = 1. / (temp - KELVIN_TO_CELCIUS)
if self.c3:
# Solve for ln_r using Cardano's formula