|
Re: Few Questions over WPILib Code
GetRate() uses the value you set with SetDistancePerPulse(). It returns distancePerPulse / the period between the last two pulses in seconds. So if you set distancePerPulse to 1.0 and the FPGA saw three pulses in the last second it would return 3.0. The units of the number you set with SetDistancePerPulse() is up to you. So if 1.0 was an inch then you are moving at 3 inches/second. If it was a foot then 3 feet / sec.
|