@@ -50,7 +50,7 @@ def __init__(self, rp, t1, r1, t2, r2, t3, r3):
50
50
51
51
if c < 0 :
52
52
print ("//////////////////////////////////////////////////////////////////////////////////////" )
53
- print ("// WARNING: negative coefficient 'c'! Something may be wrong with the measurements! //" )
53
+ print ("// WARNING: Negative coefficient 'c'! Something may be wrong with the measurements! //" )
54
54
print ("//////////////////////////////////////////////////////////////////////////////////////" )
55
55
c = - c
56
56
self .c1 = a # Steinhart-Hart coefficients
@@ -93,8 +93,8 @@ def main(argv):
93
93
r2 = 1641.9 # resistance at middle temperature (1.6 KOhm)
94
94
t3 = 250 # high temperature in Kelvin (250 degC)
95
95
r3 = 226.15 # resistance at high temperature (226.15 Ohm)
96
- rp = 4700 ; # pull-up resistor (4.7 kOhm)
97
- num_temps = 36 ; # number of entries for look-up table
96
+ rp = 4700 # pull-up resistor (4.7 kOhm)
97
+ num_temps = 36 # number of entries for look-up table
98
98
99
99
try :
100
100
opts , args = getopt .getopt (argv , "h" , ["help" , "rp=" , "t1=" , "t2=" , "t3=" , "num-temps=" ])
@@ -125,13 +125,13 @@ def main(argv):
125
125
num_temps = int (arg )
126
126
127
127
t = Thermistor (rp , t1 , r1 , t2 , r2 , t3 , r3 )
128
- increment = int ((ARES - 1 ) / (num_temps - 1 ));
129
- step = ( TMIN - TMAX ) / (num_temps - 1 )
130
- low_bound = t .temp (ARES - 1 );
131
- up_bound = t .temp (1 );
128
+ increment = int ((ARES - 1 ) / (num_temps - 1 ))
129
+ step = int (( TMIN - TMAX ) / (num_temps - 1 ) )
130
+ low_bound = t .temp (ARES - 1 )
131
+ up_bound = t .temp (1 )
132
132
min_temp = int (TMIN if TMIN > low_bound else low_bound )
133
133
max_temp = int (TMAX if TMAX < up_bound else up_bound )
134
- temps = list (range (max_temp , TMIN + step , step ));
134
+ temps = list (range (max_temp , TMIN + step , step ))
135
135
136
136
print ("// Thermistor lookup table for Marlin" )
137
137
print ("// ./createTemperatureLookupMarlin.py --rp=%s --t1=%s:%s --t2=%s:%s --t3=%s:%s --num-temps=%s" % (rp , t1 , r1 , t2 , r2 , t3 , r3 , num_temps ))
0 commit comments