mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user