FSG / System_

Fork of System_7_14 by Troy Holley

Committer:
mdavis30
Date:
Fri Jul 21 13:29:36 2017 +0000
Revision:
5:26c9083b1bf2
Parent:
4:66f2b18a16a4

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tzyoung 0:45085dd174e7 1 #include "conversions.hpp"
tzyoung 0:45085dd174e7 2
tzyoung 0:45085dd174e7 3 float counts_to_dist(int count)
tzyoung 0:45085dd174e7 4 {
mdavis30 5:26c9083b1bf2 5 float conv = 0.001220703*(-105.98*count)+388.51; //MELISSA
tnhnrl 4:66f2b18a16a4 6 //float conv = .13109129517*count-6; // TRENT
tnhnrl 4:66f2b18a16a4 7
tnhnrl 4:66f2b18a16a4 8 //TROY
mdavis30 5:26c9083b1bf2 9 //float conv = -0.1243 * count + 378.31; //created on 7/13/2017 by reading from extended (0 mm) end of piston
tzyoung 0:45085dd174e7 10 return conv;
tzyoung 0:45085dd174e7 11
tnhnrl 4:66f2b18a16a4 12 };
tnhnrl 4:66f2b18a16a4 13
tnhnrl 4:66f2b18a16a4 14 //had an issue with the original equation
tnhnrl 4:66f2b18a16a4 15 //need to double check the counts VS position (with a tape measurer)
tnhnrl 4:66f2b18a16a4 16
tnhnrl 4:66f2b18a16a4 17 //adc.ch0 or whatever gives you this