Skip to content
Snippets Groups Projects
Commit fb0996b5 authored by Steffen Vogel's avatar Steffen Vogel
Browse files

improved output aligment and precision

parent 538231ed
No related branches found
No related tags found
No related merge requests found
......@@ -137,13 +137,13 @@ def main(argv):
print "#define NUMTEMPS %s" % (len(temps))
print "const short temptable[NUMTEMPS][2] PROGMEM = {"
counter = 0
for temp in temps:
counter = counter +1
if counter == len(temps):
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)))
else:
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)))
print " { (short) (%7.2f * OVERSAMPLENR ), %s\t}%s // v=%.3f\tr=%.3f\tres=%.3f degC/count" % ( t.adc(temp), temp, \
',' if temp != temps[-1] else ' ', \
t.v( t.adc(temp)), \
t.r( t.adc(temp)), \
t.res(t.adc(temp)) \
)
print "};"
def usage():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment