Example Usage of getRobotGyro

If you need to access an object from outside the subsystem, you should do this.
This commit is contained in:
Keenan D. Buckley
2020-03-27 13:44:10 -06:00
parent 17fbc03999
commit 2c5ae300b4
@@ -84,9 +84,9 @@ public class Drive extends SubsystemBase {
private void updateSmartDashboard() {
// Examples of the functionality of RobotGyro
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.putBoolean("Is Gyro a Pigeon?", getRobotGyro().m_isGyroAPigeon);
SmartDashboard.putNumber("Turn Rate", getRobotGyro().getRate());
SmartDashboard.putNumber("Gyro Pitch", getRobotGyro().getPitch());
SmartDashboard.putData(getRobotGyro());
}
}