Fixed the motor tests by reducing speed to within the limits of the encoders we use. Also fixed java pid tolerances since getAvgError() was broken. It is now fixed and works properly. Added tests for both java and cpp that test if pid tolerances are working using fake input output pairs.

Change-Id: I5bf23dbbdab996c582e1035fc2b2f36dd5f52417
This commit is contained in:
Patrick
2016-01-28 14:25:39 -05:00
parent c6ff69079a
commit 7041cbc5eb
12 changed files with 207 additions and 41 deletions

View File

@@ -18,9 +18,9 @@ import java.util.logging.Logger;
*/
public class CANJaguarInversionTest extends AbstractCANTest {
private static final Logger logger = Logger.getLogger(CANJaguarInversionTest.class.getName());
private static final double motorVoltage = 5.0;
private static final double motorPercent = 0.5;
private static final double motorSpeed = 100;
private static final double motorVoltage = 2.0;
private static final double motorPercent = 0.1;
private static final double motorSpeed = 10;
private static final double delayTime = 0.75;
private static final double speedModeDelayTime = 2.0;

View File

@@ -37,7 +37,7 @@ public class CANPercentQuadEncoderModeTest extends AbstractCANTest {
private static final Logger logger = Logger.getLogger(CANPercentQuadEncoderModeTest.class
.getName());
private static final double kStoppedValue = 0;
private static final double kRunningValue = 1;
private static final double kRunningValue = 0.3;
/*
* (non-Javadoc)

View File

@@ -31,7 +31,7 @@ public class CANSpeedQuadEncoderModeTest extends AbstractCANTest {
/** The stopped value in rev/min */
private static final double kStoppedValue = 0;
/** The running value in rev/min */
private static final double kRunningValue = 200;
private static final double kRunningValue = 50;
@Override
protected Logger getClassLogger() {