imported dependencies, mocks gone, code builds

This commit is contained in:
aarav18
2023-01-08 11:18:00 -07:00
parent 2ea211c406
commit 50914581ca
8 changed files with 480 additions and 17 deletions
@@ -80,6 +80,6 @@ public class DiffDrive extends SubsystemBase {
SmartDashboard.putBoolean("Is Gyro a Pigeon?", m_gyro.m_isGyroAPigeon);
SmartDashboard.putNumber("Turn Rate", m_gyro.getRate());
SmartDashboard.putNumber("Gyro Pitch", m_gyro.getPitch());
SmartDashboard.putData(m_gyro);
// SmartDashboard.putData(m_gyro);
}
}
+3 -2
View File
@@ -11,13 +11,14 @@ import com.ctre.phoenix.sensors.PigeonIMU;
import com.ctre.phoenix.sensors.PigeonIMU.CalibrationMode;
import com.kauailabs.navx.frc.AHRS;
import edu.wpi.first.wpilibj.GyroBase;
// import edu.wpi.first.wpilibj.GyroBase;
import edu.wpi.first.wpilibj.interfaces.Gyro;
import edu.wpi.first.math.MathUtil;
/**
* Gyro class that allows for interchangeable use between a pigeon and a navX
*/
public class RobotGyro extends GyroBase {
public class RobotGyro implements Gyro {
private RobotTime m_robotTime = RobotTime.getInstance();
private PigeonIMU m_pigeon = null;
@@ -32,7 +32,7 @@ public class XboxTriggerButton extends Button {
}
/** {@inheritDoc} */
@Override
// @Override
public boolean get() {
if (m_trigger == RIGHT_TRIGGER) {
return m_controller.getRightTrigger();