|
@@ -137,13 +137,13 @@ def main(argv):
|
137
|
137
|
print "#define NUMTEMPS %s" % (len(temps))
|
138
|
138
|
print "const short temptable[NUMTEMPS][2] PROGMEM = {"
|
139
|
139
|
|
140
|
|
- counter = 0
|
141
|
140
|
for temp in temps:
|
142
|
|
- counter = counter +1
|
143
|
|
- if counter == len(temps):
|
144
|
|
- print " {(short)(%.2f*OVERSAMPLENR), %s} // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp)))
|
145
|
|
- else:
|
146
|
|
- print " {(short)(%.2f*OVERSAMPLENR), %s}, // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp)))
|
|
141
|
+ print " { (short) (%7.2f * OVERSAMPLENR ), %s\t}%s // v=%.3f\tr=%.3f\tres=%.3f degC/count" % ( t.adc(temp), temp, \
|
|
142
|
+ ',' if temp != temps[-1] else ' ', \
|
|
143
|
+ t.v( t.adc(temp)), \
|
|
144
|
+ t.r( t.adc(temp)), \
|
|
145
|
+ t.res(t.adc(temp)) \
|
|
146
|
+ )
|
147
|
147
|
print "};"
|
148
|
148
|
|
149
|
149
|
def usage():
|