This commit is contained in:
Shikhar
2026-02-21 15:55:29 -07:00
parent 4907e0c8a0
commit 77ca57d678
7 changed files with 143 additions and 8 deletions
@@ -9,6 +9,7 @@ package frc4388.robot;
import java.io.File;
import com.pathplanner.lib.auto.NamedCommands;
import com.pathplanner.lib.commands.PathPlannerAuto;
import com.pathplanner.lib.trajectory.PathPlannerTrajectory;
@@ -25,6 +26,7 @@ import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.RunCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.WaitCommand;
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import edu.wpi.first.wpilibj2.command.button.Trigger;
import frc4388.robot.commands.MoveForTimeCommand;
@@ -91,6 +93,20 @@ public class RobotContainer {
private SendableChooser<String> autoChooser;
private Command autoCommand;
private Command RobotIntakeDown = new SequentialCommandGroup(
new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Extended))
);
private Command RobotShoot = new SequentialCommandGroup(
new InstantCommand(() -> m_robotShooter.setShooterReady()),
new InstantCommand(()->m_robotIntake.setMode(IntakeMode.Idle)),
new WaitCommand(5),
new InstantCommand(()->m_robotShooter.setShooterShoot()),
new WaitCommand(10),
new InstantCommand(()->m_robotShooter.setShooterNOTShoot())
);
// private Command RobotShoot = new SequentialCommandGroup(
// new InstantCommand(() -> System.out.println(m_robotLED.getMode())),
// new InstantCommand(() -> m_robotLED.setMode(LEDPatterns.PARTY_TWINKLES), m_robotLED),
@@ -126,6 +142,9 @@ public class RobotContainer {
m_robotShooter.io.updateGains();
}, true);
NamedCommands.registerCommand("Robot Shoot", RobotShoot);
NamedCommands.registerCommand("Robot Intake Down", RobotIntakeDown);
DriverStation.silenceJoystickConnectionWarning(true);
@@ -7,12 +7,12 @@ public final class BuildConstants {
public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "2026KPopRobotHunters";
public static final String VERSION = "unspecified";
public static final int GIT_REVISION = 72;
public static final String GIT_SHA = "9c7159ba3b2fd669f9781f1315cb481b7a1b8d57";
public static final String GIT_DATE = "2026-02-20 21:59:06 MST";
public static final int GIT_REVISION = 75;
public static final String GIT_SHA = "4907e0c8a0fc7dade91b2075d70a2b38213f9cab";
public static final String GIT_DATE = "2026-02-21 15:08:32 MST";
public static final String GIT_BRANCH = "operator-controls";
public static final String BUILD_DATE = "2026-02-21 13:54:02 MST";
public static final long BUILD_UNIX_TIME = 1771707242280L;
public static final String BUILD_DATE = "2026-02-21 15:52:02 MST";
public static final long BUILD_UNIX_TIME = 1771714322479L;
public static final int DIRTY = 1;
private BuildConstants(){}
@@ -99,13 +99,14 @@ public final class Constants {
public static final class LEDConstants {
public static final int LED_SPARK_ID = 9;
public static final LEDPatterns DEFAULT_PATTERN = LEDPatterns.FOREST_TWINKLES;
public static final LEDPatterns DEFAULT_PATTERN = LEDPatterns.FOREST_RAINBOW;
// LED color for when the intake is out
public static final LEDPatterns INTAKE_OUT = LEDPatterns.SOLID_RED;
// LED color for when the intake is out, but the driver conditions are bad
public static final LEDPatterns INTAKE_OUT_BADPHYS = LEDPatterns.RED_STROBE;
// LED color for when the flywheel speed isn't in tolarance
public static final LEDPatterns BAD_FLYWEEL = LEDPatterns.SOLID_GOLD;
// LED color for when the flywheel speed isn't in tolarance, but the driver conditions are bad
@@ -36,7 +36,7 @@ public class LED extends SubsystemBase implements Queryable {
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
m_pwm.setSpeed(0.0);
m_pwm.setZeroLatch();
update();
}
private LEDPatterns mode = LEDConstants.DEFAULT_PATTERN;
@@ -158,7 +158,10 @@ public class Shooter extends SubsystemBase {
ShooterMode.Ready
);
}
} else {
m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN);
}