From 2c5f12c3b2993f6faeaee86aab003f14624e36c6 Mon Sep 17 00:00:00 2001 From: michael-lesirge <100492377+michael-lesirge@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:45:27 -0800 Subject: [PATCH] delete unused code --- src/main/java/frc/robot/RobotContainer.java | 21 ------------------- .../java/frc/robot/commands/AutoRotateTo.java | 3 +-- .../java/frc/robot/commands/FollowTag.java | 3 +-- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 06e9473..126243b 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,7 +6,6 @@ import frc.robot.Constants.ArmConstants; import frc.robot.subsystems.Arm; import frc.robot.commands.Autos; -import frc.robot.commands.ArmRemoteControl; import frc.robot.commands.ArmRotateTo; import frc.robot.commands.ChassisRemoteControl; import frc.robot.Constants.VisionConstants; @@ -122,7 +121,6 @@ public void setUpDriveController() { drivetrain.removeDefaultCommand(); - ArmRemoteControl armInputs; ChassisDriveInputs inputs; OptionButtonInput preciseModeButton, boostModeButton, fieldRelativeButton; @@ -135,15 +133,6 @@ public void setUpDriveController() { joystick::getTwist, -1, Constants.DriverConstants.DEAD_ZONE); - armInputs = new ArmRemoteControl(arm, - new OptionButtonInput(joystick,11, ActivationMode.HOLD), - new OptionButtonInput(joystick,12, ActivationMode.HOLD), - - new OptionButtonInput(joystick, 4, ActivationMode.HOLD), - new OptionButtonInput(joystick, 5, ActivationMode.HOLD), - new OptionButtonInput(joystick, 6, ActivationMode.HOLD) - ); - preciseModeButton = new OptionButtonInput(joystick, 2, ActivationMode.TOGGLE); boostModeButton = new OptionButtonInput(joystick, 1, ActivationMode.HOLD); fieldRelativeButton = new OptionButtonInput(joystick, 3, ActivationMode.TOGGLE); @@ -164,16 +153,6 @@ public void setUpDriveController() { xbox::getRightX, -1, Constants.DriverConstants.DEAD_ZONE); - armInputs = new ArmRemoteControl(arm, - new OptionButtonInput(xbox::rightBumper, ActivationMode.HOLD), - new OptionButtonInput(xbox::leftBumper, ActivationMode.HOLD), - - new OptionButtonInput(xbox::povLeft, ActivationMode.HOLD), - new OptionButtonInput(xbox::povRight, ActivationMode.HOLD), - new OptionButtonInput(xbox::povDown, ActivationMode.HOLD) - ); - - preciseModeButton = new OptionButtonInput(xbox::b, ActivationMode.TOGGLE); boostModeButton = new OptionButtonInput(xbox::leftStick, ActivationMode.HOLD); fieldRelativeButton = new OptionButtonInput(xbox::povUp, ActivationMode.TOGGLE); diff --git a/src/main/java/frc/robot/commands/AutoRotateTo.java b/src/main/java/frc/robot/commands/AutoRotateTo.java index eeef2ba..68ecf31 100644 --- a/src/main/java/frc/robot/commands/AutoRotateTo.java +++ b/src/main/java/frc/robot/commands/AutoRotateTo.java @@ -46,8 +46,7 @@ public AutoRotateTo(SwerveDrivetrain drivetrain, Rotation2d direction) { @Override public void initialize() { - currentAngleGoal = relative ? drivetrain.getHeading().getRadians() - : 0; + currentAngleGoal = relative ? drivetrain.getHeading().getRadians() : 0; currentAngleGoal += angleGoal; SmartDashboard.putNumber("Target Angle Auto", currentAngleGoal); } diff --git a/src/main/java/frc/robot/commands/FollowTag.java b/src/main/java/frc/robot/commands/FollowTag.java index 098d481..9c7d2c1 100644 --- a/src/main/java/frc/robot/commands/FollowTag.java +++ b/src/main/java/frc/robot/commands/FollowTag.java @@ -52,8 +52,7 @@ public FollowTag(SwerveDrivetrain drivetrain, Vision vision, Transform2d targetD * * @param drivetrain the drivetrain of the robot * @param vision the vision subsystem of the robot - * @param tagID the numerical ID of the the tag to follow, null - * for whatever best is + * @param tagID the numerical ID of the the tag to follow, null for whatever best is * @param targetDistanceToTag the target distance away from the tag to be * @param loseTagAfterSeconds how long to wait before giving up on rediscover * tag, set to null to never finish