Pigeon on Smart Dashboard

Added pigeon values to smart dashboard.
This commit is contained in:
mayabartels
2020-01-11 10:30:37 -07:00
parent 290e54157f
commit 40f72df6e4
@@ -13,6 +13,7 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import com.ctre.phoenix.sensors.PigeonIMU;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.robot.Constants.DriveConstants;
@@ -60,6 +61,18 @@ public class Drive extends SubsystemBase {
m_rightBackMotor.setInverted(InvertType.FollowMaster);
}
@Override
public void periodic() {
try {
SmartDashboard.putNumber("Pigeon Yaw", getGyroYaw());
SmartDashboard.putNumber("Pigeon Pitch", getGyroPitch());
SmartDashboard.putNumber("Pigeon Roll", getGyroRoll());
} catch (Exception e) {
//TODO: handle exception
System.err.println();
}
}
/**
* Add your docs here.
*/