FSG / System_

Fork of System_7_14 by Troy Holley

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers conversions.cpp Source File

conversions.cpp

00001 #include "conversions.hpp"
00002 
00003 float counts_to_dist(int count)
00004 {
00005     float conv = 0.001220703*(-105.98*count)+388.51; //MELISSA
00006     //float conv = .13109129517*count-6; // TRENT
00007     
00008     //TROY
00009     //float conv = -0.1243 * count + 378.31;  //created on 7/13/2017 by reading from extended (0 mm) end of piston
00010     return conv;
00011 
00012 };
00013 
00014 //had an issue with the original equation
00015 //need to double check the counts VS position (with a tape measurer)
00016 
00017 //adc.ch0 or whatever gives you this