Quote:
Originally Posted by trilogy2826
GetPeriod(): Reports inf no matter the speed of the encoder physically turning. This is odd because this function is necessary for GetDistance() to work according to the encoder.c file
|
GetDistance does not use GetPeriod(). It uses GetRaw()
Code:
/**
* Get the distance the robot has driven since the last reset.
*
* @return The distance driven since the last reset as scaled by the value from SetDistancePerPulse().
*/
double Encoder::GetDistance()
{
if (StatusIsFatal()) return 0.0;
return GetRaw() * DecodingScaleFactor() * m_distancePerPulse;
}