Browse Source

createTemperatureLookupMarlin.py: Truncate to short after application of OVERSAMPLENR for improved resolution.

David Forrest 11 years ago
parent
commit
50f44d9249
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/createTemperatureLookupMarlin.py

+ 2
- 2
Marlin/createTemperatureLookupMarlin.py View File

143
     for temp in temps:
143
     for temp in temps:
144
         counter = counter +1
144
         counter = counter +1
145
         if counter == len(temps):
145
         if counter == len(temps):
146
-            print "   {%s*OVERSAMPLENR, %s}  // v=%s r=%s res=%s C/count" % (int(t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp)))
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)))
147
         else:
147
         else:
148
-            print "   {%s*OVERSAMPLENR, %s}, // v=%s r=%s res=%s C/count" % (int(t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp)))
148
+            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)))
149
     print "};"
149
     print "};"
150
     
150
     
151
 def usage():
151
 def usage():

Loading…
Cancel
Save