mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-08 16:28:02 -06:00
Example Usage of getRobotGyro
If you need to access an object from outside the subsystem, you should do this.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user