mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
auto stuf
auto stuff
This commit is contained in:
@@ -100,6 +100,14 @@ public class RobotContainer {
|
||||
|
||||
private Command RobotShoot = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotShooter.setShooterReady()),
|
||||
new RunCommand(
|
||||
() -> {
|
||||
m_robotSwerveDrive.driveFacingPosition(
|
||||
getDeadbandedDriverController().getLeft(),
|
||||
FieldPositions.HUB_POSITION,
|
||||
ShooterConstants.AIM_LEAD_TIME.get()
|
||||
);
|
||||
}, m_robotSwerveDrive),
|
||||
new InstantCommand(()->m_robotIntake.setMode(IntakeMode.Idle)),
|
||||
new WaitCommand(5),
|
||||
new InstantCommand(()->m_robotShooter.setShooterShoot()),
|
||||
@@ -262,8 +270,7 @@ public class RobotContainer {
|
||||
m_robotShooter.setShooterReadyFeeder();
|
||||
}));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||
|
||||
@@ -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 = 75;
|
||||
public static final String GIT_SHA = "4907e0c8a0fc7dade91b2075d70a2b38213f9cab";
|
||||
public static final String GIT_DATE = "2026-02-21 15:08:32 MST";
|
||||
public static final int GIT_REVISION = 79;
|
||||
public static final String GIT_SHA = "ff0cff819cc7280a353d7ce86999efe16661f33b";
|
||||
public static final String GIT_DATE = "2026-02-23 16:58:14 MST";
|
||||
public static final String GIT_BRANCH = "operator-controls";
|
||||
public static final String BUILD_DATE = "2026-02-21 15:52:02 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771714322479L;
|
||||
public static final String BUILD_DATE = "2026-02-23 17:28:16 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771892896573L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -119,7 +119,7 @@ public final class Constants {
|
||||
|
||||
|
||||
public static final LEDPatterns OPREADY_FEED = LEDPatterns.SOLID_BLUE;
|
||||
public static final LEDPatterns OPREADY_FEED_BADPHYS = LEDPatterns.BLUE_STROBE;
|
||||
// public static final LEDPatterns OPREADY_FEED_BADPHYS = LEDPatterns.BLUE_STROBE;
|
||||
}
|
||||
|
||||
public static final class OIConstants {
|
||||
|
||||
@@ -126,8 +126,11 @@ public class Shooter extends SubsystemBase {
|
||||
boolean badShooterVelocity = Math.abs(shooterSpeed - shooterSpeedTarget) > ShooterConstants.SHOOTER_SPEED_TOLERANCE.get();
|
||||
// boolean intakeBad = m_Intake.getMode() == IntxakeMode.Extended;
|
||||
|
||||
boolean feedMdoe = this.mode == ShooterMode.ReadyFeeder |
|
||||
this.mode == ShooterMode.ShootingFeeder;
|
||||
|
||||
int bitmask = (driverError ? 1 : 0) + (badShooterVelocity ? 2 : 0) + (this.mode == ShooterMode.ReadyFeeder ? 4 : 0);
|
||||
int bitmask = (driverError ? 1 : 0) + (badShooterVelocity ? 2 : 0) + (
|
||||
(feedMdoe) ? 4 : 0);
|
||||
switch (bitmask) {
|
||||
case 0b000: // No Errors
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY);
|
||||
@@ -147,19 +150,30 @@ public class Shooter extends SubsystemBase {
|
||||
break;
|
||||
|
||||
case 0b100:
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED);
|
||||
break;
|
||||
case 0b101:
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED_BADPHYS);
|
||||
m_robotLED.setMode(Constants.LEDConstants.OPREADY_FEED);
|
||||
break;
|
||||
}
|
||||
|
||||
// // We set the shooter mode to ready if there are no errors
|
||||
mode = (
|
||||
bitmask == 0 ?
|
||||
ShooterMode.Shooting :
|
||||
ShooterMode.Ready
|
||||
);
|
||||
|
||||
if (!feedMdoe) {
|
||||
mode = (
|
||||
bitmask == 0 ?
|
||||
ShooterMode.Shooting :
|
||||
ShooterMode.Ready
|
||||
);
|
||||
} else {
|
||||
|
||||
if(bitmask == 0b100 |
|
||||
bitmask == 0b101) {
|
||||
mode = ShooterMode.ShootingFeeder;
|
||||
|
||||
} else {
|
||||
mode = ShooterMode.ReadyFeeder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN);
|
||||
@@ -196,7 +210,7 @@ public class Shooter extends SubsystemBase {
|
||||
break;
|
||||
|
||||
case ReadyFeeder:
|
||||
io.setShooterVelocity(state, ShooterConstants.getTargetShooterSpeed(distanceToHub));
|
||||
io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_FEED_VELOCITY.get()));
|
||||
io.setIndexerOutput(state, ShooterConstants.INDEXER_REVERSE_OUTPUT.get());
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user