Skip to content

Commit 2615180

Browse files
Toggle field oriented with driver B button
- Weston J
1 parent 66f69bc commit 2615180

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/frc/robot/commands/driveTeleopCommand/DriveTeleopCommand.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ public void execute() {
5757
//
5858
//NOTE no trigger takes priority of the other so if both pressed they will cancel each other
5959

60+
if (mDriveController.getBButtonPressed()) {
61+
mDrivetrain.zeroGyro();
62+
System.out.println("Reseting Gyro");
63+
}
64+
6065
double leftTrigger = mDriveController.getLeftTriggerAxis(); // Range [0.0..1.0]
6166
double rightTrigger = mDriveController.getRightTriggerAxis(); // Range [0.0..1.0]
6267

0 commit comments

Comments
 (0)