Create Mock PigeonIMU and write more Unit tests

- Test to make sure the RoboyGyro class knows what kind of gyro its using
- Test to make sure all the getters for the gyro class work (at least for pigeon)
This commit is contained in:
Keenan D. Buckley
2020-03-29 00:10:06 -06:00
parent f06b36e443
commit d354ac078b
4 changed files with 128 additions and 19 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ import edu.wpi.first.wpiutil.math.MathUtil;
public class RobotGyro extends GyroBase {
private RobotTime m_robotTime = RobotTime.getInstance();
private PigeonIMU m_pigeon;
private AHRS m_navX;
private PigeonIMU m_pigeon = null;
private AHRS m_navX = null;
public boolean m_isGyroAPigeon; //true if pigeon, false if navX
private double m_lastPigeonAngle;