]> git.taranathan.com Git - FRC2027.git/commitdiff
do some more thorough cleaning
authorTaran Nathan <moogoesmeow123@gmail.com>
Wed, 13 May 2026 21:38:11 +0000 (14:38 -0700)
committerTaran Nathan <moogoesmeow123@gmail.com>
Wed, 13 May 2026 21:47:25 +0000 (14:47 -0700)
src/main/java/frc/robot/RobotContainer.java
src/main/java/frc/robot/commands/auto_comm/DynamicAutoBuilder.java
src/main/java/frc/robot/constants/FieldConstants.java
src/main/java/frc/robot/subsystems/LED/LED.java

index a646227c7208ecca16e89c83901fe11eb1762399..60cd714e1b38b51818f75bb2be73780d3478a70b 100644 (file)
@@ -242,12 +242,6 @@ public class RobotContainer {
     // String leftDynamicShallowDoubleSwipe = "LeftDynamicShallowDoubleSwipe";
     // String rightDynamicShallowDoubleSwipe = "RightDynamicShallowDoubleSwipe";
 
-    // add commands
-    addAuto(leftDynamicLiberalDoubleSwipe, dynamicAutoBuilder.getDynamicDoubleLiberalSwipe(true));
-    addAuto(rightDynamicLiberalDoubleSwipe, dynamicAutoBuilder.getDynamicDoubleLiberalSwipe(false));
-    addAuto(leftDynamicConservativeDoubleSwipe, dynamicAutoBuilder.getDynamicDoubleConservativeSwipe(true));
-    addAuto(rightDynamicConservativeDoubleSwipe, dynamicAutoBuilder.getDynamicDoubleConservativeSwipe(false));
-
     ChoreoPathCommandBuilder choreo = new ChoreoPathCommandBuilder();
 
     // addAuto("testChoreo", ChoreoPathCommandBuilder.basicTrajectoryAuto("test.traj", true, autoFactory));
index 57acb50644b4df8237907dcc5e3f5bad1644e2c1..47516abc263e371d00614e5903aaf4dbfc906b5b 100644 (file)
@@ -7,98 +7,19 @@ import com.pathplanner.lib.commands.PathPlannerAuto;
 
 public class DynamicAutoBuilder {
 
-
-    public DynamicAutoBuilder() {
-    }
-
-    /*
-     * Autos have no named commands within them. They must be added here
-     * Still need to make one method to call that four command block in each
-     * sequential
-     */
-
-    public Command getDynamicDoubleLiberalSwipe(boolean left) {
-        return new SequentialCommandGroup(
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeOne" : "RightSwipeOne"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort());
-    }
-
-    public Command getDynamicDoubleConservativeSwipe(boolean left) {
-        return new SequentialCommandGroup(
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeConservative" : "RightSwipeConservative"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort());
-    }
-
-    public Command getDynamicDoubleShallowSwipe(boolean left) {
-        return new SequentialCommandGroup(
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeThree" : "RightSwipeThree"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort(),
-
-                departCommand(),
-                new PathPlannerAuto(left ? "LeftSwipeTwo" : "RightSwipeTwo"),
-                startShootingCommand(),
-                runSpindexerWithAbort());
-    }
-
-    private Command departCommand() {
-        return new InstantCommand(() -> {
-        });
-    }
-
-    private Command runSpindexerWithAbort() {
-        // has an isFinnished so works
-        // return new RunSpindexerWithStop(spindexer, turret, hood, intake);
-        return new DoNothing();
-    }
-
-    private Command startShootingCommand() {
-        // return new InstantCommand(() -> hood.forceHoodDown(false));
-        return new DoNothing();
-    }
+  public DynamicAutoBuilder() {
+  }
+
+  /*
+   * Autos have no named commands within them. They must be added here
+   * Still need to make one method to call that four command block in each
+   * sequential
+   */
+
+  // template:
+  // public Command templateAuto() {
+  //   return new SequentialCommandGroup(
+  //     new DoNothing()
+  //   );
+  // }
 }
index a500a8ce0c5bc3a440b886775983ec41273937e5..0f89a01acd7c93dbb76257bb3ecb4e17a36fee01 100644 (file)
@@ -21,14 +21,4 @@ public class FieldConstants {
   /** Height of the field [meters] */
   public static final double FIELD_WIDTH = field.getFieldWidth();
 
-
-  /**
-   * 
-   * @return Whether Y coordinate is in the upper half (left side on blue
-   *         alliance)
-   */
-  public static boolean isOnLeftSideOfField(Translation2d drivepose) {
-    return drivepose.getY() > FIELD_WIDTH / 2;
-  }
-
 }
index d502d49461edf14789659999619b28a19b5f95e6..ab4fbeb71016fe3ab3fe57e6ddcdbc4423d61ad6 100644 (file)
@@ -1,7 +1,5 @@
 package frc.robot.subsystems.LED;
 
-import java.util.Optional;
-
 import com.ctre.phoenix6.configs.CANdleConfigurator;
 import com.ctre.phoenix6.configs.CANdleFeaturesConfigs;
 import com.ctre.phoenix6.configs.LEDConfigs;
@@ -22,7 +20,6 @@ import com.ctre.phoenix6.signals.VBatOutputModeValue;
 
 import edu.wpi.first.wpilibj.DriverStation;
 import edu.wpi.first.wpilibj.DriverStation.Alliance;
-import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
 import edu.wpi.first.wpilibj.util.Color;
 import edu.wpi.first.wpilibj2.command.InstantCommand;
 import edu.wpi.first.wpilibj2.command.SubsystemBase;
@@ -62,17 +59,6 @@ public class LED extends SubsystemBase {
                lightsOff();
 
                // System.out.println("CANdle features: " + featureConf + ", LED config: " + ledConf);
-
-               SmartDashboard.putData("LED Disable", new InstantCommand(() -> {forceOff = true; lightsOff();}).ignoringDisable(true));
-               SmartDashboard.putData("LED Enable", new InstantCommand(() -> forceOff = false).ignoringDisable(true));
-               SmartDashboard.putData("LED Strobe", new InstantCommand(() -> setStrobe()).ignoringDisable(true));
-               SmartDashboard.putData("LED Static", new InstantCommand(() -> setStatic()).ignoringDisable(true));
-               SmartDashboard.putData("LED Fire", new InstantCommand(() -> setFire()).ignoringDisable(true));
-               SmartDashboard.putData("LED Rainbow", new InstantCommand(() -> setRainbow()).ignoringDisable(true));
-               SmartDashboard.putData("LED Fade", new InstantCommand(() -> setRgbFadeAnimation()).ignoringDisable(true));
-               SmartDashboard.putData("LED Twinkle", new InstantCommand(() -> setTwinkle()).ignoringDisable(true));
-               SmartDashboard.putData("LED Color Flow", new InstantCommand(() -> setColorFlow()).ignoringDisable(true));
-               SmartDashboard.putData("LED Color Team Reset", new InstantCommand(() -> setColor()).ignoringDisable(true));
        }
 
        public void setColor() {
@@ -96,8 +82,8 @@ public class LED extends SubsystemBase {
        @Override
        public void periodic() {
                State targetState = State.ON;
-               if (underSecsToFlip(5)) targetState = State.SLOW;
-               if (underSecsToFlip(1)) targetState = State.FAST;
+               // if (underSecsToFlip(5)) targetState = State.SLOW;
+               // if (underSecsToFlip(1)) targetState = State.FAST;
                if (DriverStation.isAutonomous()) targetState = State.AUTO;
                if (DriverStation.getMatchTime() < 30) targetState = State.ENDGAME;
                if (forceOff) targetState = State.OFF;
@@ -159,24 +145,4 @@ public class LED extends SubsystemBase {
                candle.clearAllAnimations();
                candle.setControl(new SolidColor(8 , 8 + stripLength).withColor(new RGBWColor(0, 0, 0, 0)));
        }
-       
-
-       private boolean underSecsToFlip(double secs) {
-               // Optional<Double> timeToActive = HubActive.timeToActive();
-               // Optional<Double> timeToInactive = HubActive.timeToInactive();
-               Optional<Double> timeToActive = Optional.empty();
-               Optional<Double> timeToInactive = Optional.empty();
-
-               if (timeToActive.isEmpty() && timeToInactive.isEmpty()) {
-                       return false;
-               } else if (timeToActive.isPresent() && timeToActive.get() != 0) {
-                       return (timeToActive.get() <= secs);
-
-               } else if (timeToInactive.isPresent() && timeToInactive.get() != 0) {
-                       return (timeToInactive.get() <= secs);
-               } else {
-                       return false;
-               }
-       }
-
 }