mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
More updates to the Gyro test fixing potential null pointer exception
also retuned the deviation over time test to make it pass more reliably. Ran sucessfully 40/40 times run including several run with the entire wpilibj Change-Id: I2e42c368fdb81f9206e15ce39878ea105da1e405
This commit is contained in:
@@ -65,6 +65,7 @@ public abstract class TiltPanCameraFixture implements ITestFixture {
|
||||
|
||||
@Override
|
||||
public boolean reset() {
|
||||
if(gyro != null)
|
||||
gyro.reset();
|
||||
return true;
|
||||
}
|
||||
@@ -101,8 +102,14 @@ public abstract class TiltPanCameraFixture implements ITestFixture {
|
||||
tilt = null;
|
||||
pan.free();
|
||||
pan = null;
|
||||
if(gyro !=null){//in case not freed during gyro tests
|
||||
gyro.free();
|
||||
gyro = null;
|
||||
}
|
||||
if(gyroParam != null){//in case gyro tests failed before getting to this point
|
||||
gyroParam.free();
|
||||
gyroParam = null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user