From 645f4bfe079f3bb49ee1eddb65fb0fb4495c950b Mon Sep 17 00:00:00 2001 From: Ryan Manley <42309874+ryan123rudder@users.noreply.github.com> Date: Sun, 6 Mar 2022 11:23:40 -0700 Subject: [PATCH] reset gyro --- src/main/java/frc4388/robot/RobotContainer.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 080a019..0b5cc75 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -177,9 +177,11 @@ public class RobotContainer { /* Driver Buttons */ // Start > Calibrate Odometry - new JoystickButton(getDriverController(), XboxController.Button.kStart.value) - .whenPressed(m_robotSwerveDrive::resetGyro) + new JoystickButton(getDriverController(), XboxController.Button.kBack.value) .whenPressed(() -> resetOdometry(new Pose2d(0, 0, new Rotation2d(0)))); + // Start > Calibrate Odometry + new JoystickButton(getDriverController(), XboxController.Button.kStart.value) + .whenPressed(m_robotSwerveDrive::resetGyro); // Left Bumper > Shift Down new JoystickButton(getDriverController(), XboxController.Button.kLeftBumper.value) .whenPressed(() -> m_robotSwerveDrive.highSpeed(false)); @@ -190,6 +192,7 @@ public class RobotContainer { new JoystickButton(getDriverController(), XboxController.Button.kA.value) .whileHeld( new RunCommand(() -> m_robotSerializer.setSerializer(0.25))) .whenReleased(new RunCommand(() -> m_robotSerializer.setSerializer(0.0))); + new JoystickButton(getDriverController(), XboxController.Button.kB.value) .whileHeld(new RunCommand(() -> m_robotSerializer.setSerializer(-0.25))) .whenReleased(new RunCommand(() -> m_robotSerializer.setSerializer(0.0)));