From 25958d76046ff7f270eed072f24698cc571e2741 Mon Sep 17 00:00:00 2001 From: Wesley28w Date: Fri, 27 Mar 2026 08:32:20 -0700 Subject: [PATCH] delete climb, fix error --- src/main/java/frc/robot/RobotContainer.java | 5 ++- src/main/java/frc/robot/RobotId.java | 2 +- .../robot/commands/gpm/HardstopWarning.java | 14 ++++---- .../controls/PS5ControllerDriverConfig.java | 32 ------------------- 4 files changed, 10 insertions(+), 43 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 751d162..7476124 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -22,7 +22,7 @@ import edu.wpi.first.wpilibj2.command.InstantCommand; import frc.robot.commands.drive_comm.DefaultDriveCommand; import frc.robot.commands.gpm.AutoShootCommand; import frc.robot.commands.gpm.ClimbDriveCommand; -import frc.robot.commands.gpm.HardstopWarning; +// import frc.robot.commands.gpm.HardstopWarning; import frc.robot.commands.gpm.IntakeMovementCommand; import frc.robot.commands.gpm.RunSpindexer; import frc.robot.commands.gpm.Superstructure; @@ -157,8 +157,7 @@ public class RobotContainer { } if (intake != null && hood != null && turret != null) - CommandScheduler.getInstance().schedule(new HardstopWarning(hood, intake, turret)); - + // CommandScheduler.getInstance().schedule(new HardstopWarning(hood, intake, turret)); (no more crt for this) // This is really annoying so it's disabled DriverStation.silenceJoystickConnectionWarning(true); diff --git a/src/main/java/frc/robot/RobotId.java b/src/main/java/frc/robot/RobotId.java index 9def1ac..b4df9f1 100644 --- a/src/main/java/frc/robot/RobotId.java +++ b/src/main/java/frc/robot/RobotId.java @@ -10,7 +10,7 @@ import edu.wpi.first.wpilibj.Preferences; */ public enum RobotId { Default, - PrimeJr, WaffleHouse, TwinTake, SwerveCompetition, Vertigo, Vivace, Phil, BetaBot, + PrimeJr, WaffleHouse, TwinBot, SwerveCompetition, Vertigo, Vivace, Phil, BetaBot, ClassBot1, ClassBot2, ClassBot3, ClassBot4, TestBed1, TestBed2; diff --git a/src/main/java/frc/robot/commands/gpm/HardstopWarning.java b/src/main/java/frc/robot/commands/gpm/HardstopWarning.java index 7427753..f55702d 100644 --- a/src/main/java/frc/robot/commands/gpm/HardstopWarning.java +++ b/src/main/java/frc/robot/commands/gpm/HardstopWarning.java @@ -32,13 +32,13 @@ public class HardstopWarning extends Command { SmartDashboard.putBoolean("Hood OK", hood.getPositionDeg() >= HoodConstants.MIN_ANGLE - epsilon); SmartDashboard.putBoolean("Intake OK", intake.getPosition() >= IntakeConstants.STARTING_POINT - epsilon); - if (Math.abs(turret.getPositionRad()) <= epsilon) { - var encoderPositions = turret.getEncoderPositions(); - if (Math.abs(encoderPositions.getFirst()) <= epsilon && Math.abs(encoderPositions.getSecond()) <= epsilon) - turretStatus = "Ok"; - else - turretStatus = "Bad"; - } + // if (Math.abs(turret.getPositionRad()) <= epsilon) { + // var encoderPositions = turret.getEncoderPositions(); + // if (Math.abs(encoderPositions.getFirst()) <= epsilon && Math.abs(encoderPositions.getSecond()) <= epsilon) + // turretStatus = "Ok"; + // else + // turretStatus = "Bad"; + // } SmartDashboard.putString("Turret Status", turretStatus); } diff --git a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java index abc8eb7..4008192 100644 --- a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java +++ b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java @@ -155,40 +155,8 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig { controller.get(PS5Button.SQUARE).toggleOnTrue(autoShoot); } - // Climb - if (climb != null) { - // Calibration - controller.get(PS5Button.OPTIONS).onTrue(new InstantCommand(() -> { - climb.hardstopCalibration(); - })).onFalse(new InstantCommand(() -> { - climb.stopCalibrating(); - })); - - // Climb retract - controller.get(PS5Button.CROSS).onTrue(new InstantCommand(() -> { - climb.retract(); - })); - - // Go to up position - controller.get(PS5Button.TRIANGLE).onTrue(new InstantCommand(() -> { - climb.goUp(); - })); - - // Go to climb position - controller.get(PS5Button.TOUCHPAD).onTrue(new InstantCommand(() -> { - climb.climbPosition(); - })); - } - // Hood if (hood != null) { - // Calibration - // controller.get(PS5Button.PS).onTrue(new InstantCommand(() -> { - // hood.calibrate(); - // })).onFalse(new InstantCommand(() -> { - // hood.stopCalibrating(); - // })); - // Set the hood down -- for safety measures under trench controller.get(DPad.LEFT).onTrue(new InstantCommand(()->{ hood.forceHoodDown(true); -- 2.39.5