]> git.taranathan.com Git - FRC2026.git/commitdiff
small cleanup
authoriefomit <timofei.stem@gmail.com>
Wed, 25 Feb 2026 02:07:23 +0000 (18:07 -0800)
committeriefomit <timofei.stem@gmail.com>
Wed, 25 Feb 2026 02:07:23 +0000 (18:07 -0800)
src/main/java/frc/robot/RobotContainer.java
src/main/java/frc/robot/commands/gpm/ReverseMotors.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/util/TrenchAssist/TrenchAssist2.java
src/main/java/frc/robot/util/TrenchAssist/TrenchAssistConstants.java

index a9b8670987070bcda14b57adbe2b98f03a750cff..bbe567dea42f8b86cec59921941aa3f8accc0021 100644 (file)
@@ -100,11 +100,11 @@ public class RobotContainer {
       case SwerveCompetition: // AKA "Vantage"
 
       case BetaBot: // AKA "Pancake"
-        //vision = new Vision(VisionConstants.APRIL_TAG_CAMERAS);
+        // vision = new Vision(VisionConstants.APRIL_TAG_CAMERAS);
         // fall-through
 
       case Vivace:
-        //linearClimb = new LinearClimb();
+        // linearClimb = new LinearClimb();
 
       case Phil: // AKA "IHOP"
 
index b85c9d9fa57fdaba66f391b5811b7f9ae5411732..60cb84e80266b69838c462b3d15d71ccc873dd8b 100644 (file)
@@ -2,8 +2,6 @@ package frc.robot.commands.gpm;
 
 import edu.wpi.first.wpilibj2.command.Command;
 import frc.robot.subsystems.Intake.Intake;
-import frc.robot.subsystems.shooter.Shooter;
-import frc.robot.subsystems.shooter.ShooterConstants;
 import frc.robot.subsystems.spindexer.Spindexer;
 
 public class ReverseMotors extends Command {
index ccf47550cb664a12b138b79cd8cafdf6127b4cb5..89337f1bbad3014c300367571f5695923dcb8537 100644 (file)
@@ -4,7 +4,6 @@ import java.util.function.BooleanSupplier;
 
 import edu.wpi.first.math.geometry.Rotation2d;
 import edu.wpi.first.wpilibj.DriverStation.Alliance;
-import edu.wpi.first.wpilibj.PS5Controller.Button;
 import edu.wpi.first.wpilibj2.command.Command;
 import edu.wpi.first.wpilibj2.command.CommandScheduler;
 import edu.wpi.first.wpilibj2.command.FunctionalCommand;
@@ -81,11 +80,23 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
                 () -> false, getDrivetrain()).withTimeout(2));
 
         // Trench align
-        controller.get(PS5Button.CIRCLE).onTrue(new InstantCommand(() -> {getDrivetrain().setTrenchAssist(true); getDrivetrain().setTrenchAlign(true);}))
-            .onFalse(new InstantCommand(() -> {getDrivetrain().setTrenchAssist(false); getDrivetrain().setTrenchAlign(false);}));
-
-        controller.get(DPad.LEFT).onTrue(new InstantCommand(() -> {getDrivetrain().setTrenchAssist(true); getDrivetrain().setTrenchAlign(true);}))
-            .onFalse(new InstantCommand(() -> {getDrivetrain().setTrenchAssist(false); getDrivetrain().setTrenchAlign(false);}));
+        controller.get(PS5Button.CIRCLE).onTrue(new InstantCommand(() -> {
+            getDrivetrain().setTrenchAssist(true);
+            getDrivetrain().setTrenchAlign(true);
+        }))
+                .onFalse(new InstantCommand(() -> {
+                    getDrivetrain().setTrenchAssist(false);
+                    getDrivetrain().setTrenchAlign(false);
+                }));
+
+        controller.get(DPad.LEFT).onTrue(new InstantCommand(() -> {
+            getDrivetrain().setTrenchAssist(true);
+            getDrivetrain().setTrenchAlign(true);
+        }))
+                .onFalse(new InstantCommand(() -> {
+                    getDrivetrain().setTrenchAssist(false);
+                    getDrivetrain().setTrenchAlign(false);
+                }));
 
         // Reverse motors
         if (intake != null && spindexer != null && shooter != null) {
index 0188a0d42a75033e4a4c05bbaca8d7d21232d862..cd93f0d084e85ea10bb116fef91de5b07c65b59e 100644 (file)
@@ -32,17 +32,18 @@ public class TrenchAssist2 {
 
         double correctionVelocity = pid.calculate(distanceFromSlideLatitude, 0);
 
-        if (distanceFromSlideLatitude < Units.inchesToMeters(3)){
+        if (distanceFromSlideLatitude < Units.inchesToMeters(3)) {
             correctionVelocity = 0.0;
         }
 
-
         ChassisSpeeds horizontalSpeeds = new ChassisSpeeds(chassisSpeeds.vxMetersPerSecond, correctionVelocity,
                 chassisSpeeds.omegaRadiansPerSecond);
 
-        var y = new Translation2d(horizontalSpeeds.vxMetersPerSecond, horizontalSpeeds.vyMetersPerSecond).rotateBy(drive.getYaw());
+        var y = new Translation2d(horizontalSpeeds.vxMetersPerSecond, horizontalSpeeds.vyMetersPerSecond)
+                .rotateBy(drive.getYaw());
 
-        var z = ChassisSpeeds.fromFieldRelativeSpeeds(new ChassisSpeeds(y.getX(), y.getY(), horizontalSpeeds.omegaRadiansPerSecond),
+        var z = ChassisSpeeds.fromFieldRelativeSpeeds(
+                new ChassisSpeeds(y.getX(), y.getY(), horizontalSpeeds.omegaRadiansPerSecond),
                 drive.getYaw());
 
         return z;
index f745e2ed1e5cc1581db98396b7b95b7fdc4e06ec..c6e12083ffa3c9b7203ccaafe35732057fc7f569 100644 (file)
@@ -21,11 +21,11 @@ public class TrenchAssistConstants {
             new Rectangle2d(new Translation2d(99.99, 99.9), new Translation2d(0.0, 0.0)),
     };
 
-    public static final double[] SLIDE_LATITUDES = new double[]{
-        FieldConstants.FIELD_WIDTH - Units.inchesToMeters(30.0),
-        Units.inchesToMeters(30.0), // should be accurate, i think our field is slightly too small
-        // 6.550,
-        // 0.668,
+    public static final double[] SLIDE_LATITUDES = new double[] {
+            FieldConstants.FIELD_WIDTH - Units.inchesToMeters(30.0),
+            Units.inchesToMeters(30.0), // should be accurate, i think our field is slightly too small
+            // 6.550,
+            // 0.668,
 
     };