From 40f72df6e41f2d0cbad4188ac6fdb65a69fe9c9a Mon Sep 17 00:00:00 2001 From: mayabartels Date: Sat, 11 Jan 2020 10:30:37 -0700 Subject: [PATCH] Pigeon on Smart Dashboard Added pigeon values to smart dashboard. --- src/main/java/frc4388/robot/subsystems/Drive.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/frc4388/robot/subsystems/Drive.java b/src/main/java/frc4388/robot/subsystems/Drive.java index 4a369d9..06c8fe7 100644 --- a/src/main/java/frc4388/robot/subsystems/Drive.java +++ b/src/main/java/frc4388/robot/subsystems/Drive.java @@ -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. */