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:
@@ -196,6 +196,7 @@ public class MotorEncoderTest extends AbstractComsSetup {
|
||||
assertEquals(me.getType() + " Motor value was incorrect after reset.", me.getMotor().get(), 0, 0);
|
||||
assertEquals(me.getType() + " Counter1 value was incorrect after reset.", me.getCounters()[0].get(), 0);
|
||||
assertEquals(me.getType() + " Counter2 value was incorrect after reset.", me.getCounters()[1].get(), 0);
|
||||
Timer.delay(0.5); // so this doesn't fail with the 0.5 second default timeout on the encoders
|
||||
assertTrue(me.getType() + " Encoder.getStopped() returned false after the motor was reset.", me.getEncoder().getStopped());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user