Encoder/Counter Fixes

This fixes all encoder variants with the getRate and getPeriod methods.
The clock speed in the HAL was updated, as was the scaling factors for setting
the stall periods. A default of .5 seconds is now set for the max period.
Additionally, a long standing bug was fixed with Java 2x encoders.

Changed tests to take into account the increased default timeout on encoders

Change-Id: I8b54c07ea467154be94d7ae7e9ada1775933dee4
This commit is contained in:
Brad Miller
2014-12-23 19:47:23 -05:00
parent b4097fbd58
commit a55f34646d
6 changed files with 18 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ void Encoder::InitEncoder(bool reverseDirection, EncodingType encodingType)
reverseDirection, &index, &status);
wpi_setErrorWithContext(status, getHALErrorMessage(status));
m_counter = NULL;
SetMaxPeriod(.5);
break;
}
case k1X: