Skip to content

Commit 750d9a1

Browse files
committed
more lint
1 parent 8fdeab5 commit 750d9a1

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

adafruit_max31855.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
https://github.com/adafruit/circuitpython/releases
4444
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
4545
"""
46-
from math import exp, pow
46+
import math
4747
try:
4848
import struct
4949
except ImportError:
@@ -109,26 +109,26 @@ def temperature_NIST(self):
109109
if TAMB >= 0:
110110
VREF =(-0.176004136860E-01 +
111111
0.389212049750E-01 * TAMB +
112-
0.185587700320E-04 * pow(TAMB, 2) +
113-
-0.994575928740E-07 * pow(TAMB, 3) +
114-
0.318409457190E-09 * pow(TAMB, 4) +
115-
-0.560728448890E-12 * pow(TAMB, 5) +
116-
0.560750590590E-15 * pow(TAMB, 6) +
117-
-0.320207200030E-18 * pow(TAMB, 7) +
118-
0.971511471520E-22 * pow(TAMB, 8) +
119-
-0.121047212750E-25 * pow(TAMB, 9) +
120-
0.1185976 * exp(-0.1183432E-03 * pow(TAMB - 0.1269686E+03, 2)))
112+
0.185587700320E-04 * math.pow(TAMB, 2) +
113+
-0.994575928740E-07 * math.pow(TAMB, 3) +
114+
0.318409457190E-09 * math.pow(TAMB, 4) +
115+
-0.560728448890E-12 * math.pow(TAMB, 5) +
116+
0.560750590590E-15 * math.pow(TAMB, 6) +
117+
-0.320207200030E-18 * math.pow(TAMB, 7) +
118+
0.971511471520E-22 * math.pow(TAMB, 8) +
119+
-0.121047212750E-25 * math.pow(TAMB, 9) +
120+
0.1185976 * math.exp(-0.1183432E-03 * math.pow(TAMB - 0.1269686E+03, 2)))
121121
else:
122122
VREF =( 0.394501280250E-01 * TAMB +
123-
0.236223735980E-04 * pow(TAMB, 2) +
124-
-0.328589067840E-06 * pow(TAMB, 3) +
125-
-0.499048287770E-08 * pow(TAMB, 4) +
126-
-0.675090591730E-10 * pow(TAMB, 5) +
127-
-0.574103274280E-12 * pow(TAMB, 6) +
128-
-0.310888728940E-14 * pow(TAMB, 7) +
129-
-0.104516093650E-16 * pow(TAMB, 8) +
130-
-0.198892668780E-19 * pow(TAMB, 9) +
131-
-0.163226974860E-22 * pow(TAMB, 10))
123+
0.236223735980E-04 * math.pow(TAMB, 2) +
124+
-0.328589067840E-06 * math.pow(TAMB, 3) +
125+
-0.499048287770E-08 * math.pow(TAMB, 4) +
126+
-0.675090591730E-10 * math.pow(TAMB, 5) +
127+
-0.574103274280E-12 * math.pow(TAMB, 6) +
128+
-0.310888728940E-14 * math.pow(TAMB, 7) +
129+
-0.104516093650E-16 * math.pow(TAMB, 8) +
130+
-0.198892668780E-19 * math.pow(TAMB, 9) +
131+
-0.163226974860E-22 * math.pow(TAMB, 10))
132132
# total thermoelectric voltage
133133
VTOTAL = VOUT + VREF
134134
# determine coefficients
@@ -167,5 +167,5 @@ def temperature_NIST(self):
167167
# compute temperature
168168
TEMPERATURE = 0
169169
for n, c in enumerate(DCOEF):
170-
TEMPERATURE += c * pow(VTOTAL, n)
170+
TEMPERATURE += c * math.pow(VTOTAL, n)
171171
return TEMPERATURE

0 commit comments

Comments
 (0)