WPILibJ More Integration Tests

Refactors the MotorEncoderTest to make use of the parameterized testing framework
Adds a test for the Preferences Class
Updates the TiltPanCameraTest to work
Makes the TimerTest use math for long values
Adds a Button Test to Test the internal Button
Speeds up the FakeCounterSource/FakeEncoderSource to decrease test time
Moves the AbstractComsSetup Block to a static method so that it only runs once
Updates the logging.properties class so that tests are quieter

Change-Id: I70b39f34122e6398f406a63e6ef04cde9fbe95ef
This commit is contained in:
Jonathan Leitschuh
2014-06-10 16:25:06 -04:00
parent 85d9ead4e2
commit 8b19137ca6
17 changed files with 574 additions and 122 deletions

View File

@@ -103,16 +103,10 @@ public class PIDController implements IUtility, LiveWindowSendable, Controller {
}
public void run() {
boolean freed;
synchronized (this){
freed = m_freed;
}
if(!freed){
if(!m_freed){
m_controller.calculate();
} else {
cancel();
m_controlLoop.cancel();
m_controlLoop.purge();
}
}
}