Increases tolerances for the PID tests

The tolerance is now a little bit more loose but still demonstrates that the PID works correctly.

Change-Id: I9ca74e66fd096c49be7de61f218d5651b0ca0586
This commit is contained in:
Jonathan Leitschuh
2014-10-22 11:55:19 -04:00
parent 8c01e9065a
commit f7e8b95a24

View File

@@ -44,9 +44,8 @@ public class PIDTest extends AbstractComsSetup {
private static final Logger logger = Logger.getLogger(PIDTest.class.getName());
private NetworkTable table;
private static final double absoluteTollerance = 20;
private static final double outputRange = 0.19;
private static final double absoluteTollerance = 30;
private static final double outputRange = 0.2;
private PIDController controller = null;
private static MotorEncoderFixture me = null;
@@ -173,7 +172,7 @@ public class PIDTest extends AbstractComsSetup {
controller.disable();
controller.setSetpoint(setpoint);
controller.enable();
assertEquals(setpoint, new Double(controller.getSetpoint()));
assertEquals("Did not correctly set set-point",setpoint, new Double(controller.getSetpoint()));
}
@Test (timeout = 6000)
@@ -187,7 +186,7 @@ public class PIDTest extends AbstractComsSetup {
controller.enable();
Timer.delay(5);
controller.disable();
assertTrue(pidData() + "Controller Error: " + controller.getError(), controller.onTarget());
assertTrue(pidData() + "Was not on Target. Controller Error: " + controller.getError(), controller.onTarget());
}
private String pidData(){