Skip to content

Commit 1598979

Browse files
Update - fix py script
1 parent 7a07c91 commit 1598979

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildroot/share/scripts/createTemperatureLookupMarlin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def resist(self, adc):
7575
def temp(self, adc):
7676
"""Convert ADC reading into a temperature in Celsius"""
7777
r = self.resist(adc)
78-
l = math.log(r)
79-
inv_T = self.c1 + self.c2 * l + self.c3 * (l ** 3) # Inverse temperature
78+
log_r = math.log(r)
79+
inv_T = self.c1 + self.c2 * log_r + self.c3 * (log_r ** 3) # Inverse temperature
8080
return (1.0 / inv_T) - ZERO # Temperature
8181

8282
def adc(self, temp):

0 commit comments

Comments
 (0)