controls fix

This commit is contained in:
Michael Mikovsky
2026-02-25 16:35:40 -08:00
parent 3d22607e5a
commit 0009dfeb46
4 changed files with 16 additions and 35 deletions
+10 -14
View File
@@ -257,8 +257,13 @@ public class RobotContainer {
new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON) new JoystickButton(getDeadbandedOperatorController(), XboxController.LEFT_BUMPER_BUTTON)
.onTrue(new InstantCommand(() -> { .onTrue(new InstantCommand(() -> {
m_robotShooter.spinUpFeeding();
m_robotIntake.rollerStop();
}))
.onFalse(new InstantCommand(() -> {
m_robotShooter.spinUpIdle();
m_robotIntake.setMode(IntakeMode.Extended); m_robotIntake.setMode(IntakeMode.Extended);
})); }));
@@ -267,30 +272,21 @@ public class RobotContainer {
new Trigger(() -> getDeadbandedOperatorController().getLeftTriggerAxis() >= 0.5) new Trigger(() -> getDeadbandedOperatorController().getLeftTriggerAxis() >= 0.5)
.onTrue(new InstantCommand(() -> { .onTrue(new InstantCommand(() -> {
m_robotShooter.spinUpShooting(); m_robotShooter.spinUpShooting();
m_robotIntake.setMode(IntakeMode.Idle);
m_robotIntake.rollerStop(); m_robotIntake.rollerStop();
})) }))
.onFalse(new InstantCommand(() -> { .onFalse(new InstantCommand(() -> {
m_robotShooter.spinUpIdle(); m_robotShooter.spinUpIdle();
m_robotIntake.setMode(IntakeMode.Extended);
})); }));
new JoystickButton(getDeadbandedOperatorController(), XboxController.LEFT_BUMPER_BUTTON) new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
.onTrue(new InstantCommand(() -> { .onTrue(new InstantCommand(() -> {
m_robotShooter.spinUpShooting(); m_robotIntake.setMode(IntakeMode.Retracted);
m_robotIntake.setMode(IntakeMode.Idle);
})); }));
new JoystickButton(getDeadbandedOperatorController(), XboxController.BACK_BUTTON)
.onTrue(new InstantCommand(() -> {
m_robotShooter.spinUpFeeding();
}));
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON) new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
.onTrue(new InstantCommand(() -> { .onTrue(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Retracted); m_robotIntake.setMode(IntakeMode.Extended);
})); }));
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON) new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
@@ -7,12 +7,12 @@ public final class BuildConstants {
public static final String MAVEN_GROUP = ""; public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "2026KPopRobotHunters"; public static final String MAVEN_NAME = "2026KPopRobotHunters";
public static final String VERSION = "unspecified"; public static final String VERSION = "unspecified";
public static final int GIT_REVISION = 79; public static final int GIT_REVISION = 85;
public static final String GIT_SHA = "ff0cff819cc7280a353d7ce86999efe16661f33b"; public static final String GIT_SHA = "3d22607e5a8805f6bafa42d0e8ae41a719741842";
public static final String GIT_DATE = "2026-02-23 16:58:14 MST"; public static final String GIT_DATE = "2026-02-25 16:33:01 MST";
public static final String GIT_BRANCH = "operator-controls"; public static final String GIT_BRANCH = "shikhar-op-controls";
public static final String BUILD_DATE = "2026-02-23 17:28:16 MST"; public static final String BUILD_DATE = "2026-02-25 17:33:10 MST";
public static final long BUILD_UNIX_TIME = 1771892896573L; public static final long BUILD_UNIX_TIME = 1772065990668L;
public static final int DIRTY = 1; public static final int DIRTY = 1;
private BuildConstants(){} private BuildConstants(){}
@@ -56,12 +56,6 @@ public class IntakeReal implements IntakeIO {
@Override @Override
public void setRollerOutput(IntakeState state, double rollerOutput) { public void setRollerOutput(IntakeState state, double rollerOutput) {
state.rollerTargetOutput = rollerOutput; state.rollerTargetOutput = rollerOutput;
if(rollerOutput == 0) {
m_rollerMotor.set(0);
return;
}
m_rollerMotor.set(rollerOutput); m_rollerMotor.set(rollerOutput);
} }
@@ -86,15 +86,6 @@ public class ShooterReal implements ShooterIO {
@Override @Override
public void setIndexerOutput(ShooterState state, double percentOutput) { public void setIndexerOutput(ShooterState state, double percentOutput) {
state.indexerTargetOutput = percentOutput; state.indexerTargetOutput = percentOutput;
if(percentOutput == 0) {
m_indexerMotor.set(0);
return;
}
// AngularVelocity motorRps = target.times(ShooterConstants.INDEXER_GEAR_RATIO);
m_indexerMotor.set(percentOutput); m_indexerMotor.set(percentOutput);
} }