FSG / System

Dependents:   7_21_17_FSG 7_26_17_FSG

Fork of System_ by FSG

Committer:
mdavis30
Date:
Fri Jul 28 18:49:58 2017 +0000
Revision:
7:60b1f9e72822
Parent:
6:8764d841a892

        

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 6:8764d841a892 5 float conv = 0.001220703*(-105.98*count)+388.51; //MELISSA +5mm off from end
mdavis30 6:8764d841a892 6 //float conv = 0.001220703*(-108.84*count)+399.27;
tnhnrl 4:66f2b18a16a4 7 //float conv = .13109129517*count-6; // TRENT
tnhnrl 4:66f2b18a16a4 8
tnhnrl 4:66f2b18a16a4 9 //TROY
mdavis30 5:26c9083b1bf2 10 //float conv = -0.1243 * count + 378.31; //created on 7/13/2017 by reading from extended (0 mm) end of piston
tzyoung 0:45085dd174e7 11 return conv;
tzyoung 0:45085dd174e7 12
tnhnrl 4:66f2b18a16a4 13 };
tnhnrl 4:66f2b18a16a4 14
tnhnrl 4:66f2b18a16a4 15 //had an issue with the original equation
tnhnrl 4:66f2b18a16a4 16 //need to double check the counts VS position (with a tape measurer)
tnhnrl 4:66f2b18a16a4 17
tnhnrl 4:66f2b18a16a4 18 //adc.ch0 or whatever gives you this