squidward

This commit is contained in:
Shikhar
2026-02-16 16:19:51 -07:00
parent 8551843831
commit 84596775b7
4 changed files with 23 additions and 21 deletions
+10 -11
View File
@@ -250,18 +250,12 @@ public class RobotContainer {
//Operator Controls
new Trigger(() -> getDeadbandedOperatorController().getLeftTriggerAxis() >= 0.5)
.onTrue(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Extending);
}))
.onFalse(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Idle);
m_robotIntake.setMode(IntakeMode.Extended);
}));
new JoystickButton(getDeadbandedOperatorController(), XboxController.LEFT_BUMPER_BUTTON)
.onTrue(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Retracting);
}))
.onFalse(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Idle);
m_robotIntake.setMode(IntakeMode.Retracted);
}));
new Trigger(() -> getDeadbandedOperatorController().getRightTriggerAxis() >= 0.5)
@@ -275,14 +269,19 @@ public class RobotContainer {
}));
new JoystickButton(getDeadbandedOperatorController(), XboxController.Y_BUTTON)
.onFalse(new InstantCommand(() -> {
.onTrue(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Retracting);
}))
.onFalse(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Idle);
}));
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
.onFalse(new InstantCommand(() -> {
m_robotShooter.setShooterNotReady();
.onTrue(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Extending);
}))
.onFalse(new InstantCommand(() -> {
m_robotIntake.setMode(IntakeMode.Idle);
}));
@@ -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 = 60;
public static final String GIT_SHA = "f88619a1da6b3adf64df3c4277deeca5bed6ee21";
public static final String GIT_DATE = "2026-02-14 15:57:33 MST";
public static final int GIT_REVISION = 61;
public static final String GIT_SHA = "8551843831dbdc8790c0f9c02fb406248b69ec7a";
public static final String GIT_DATE = "2026-02-16 15:57:24 MST";
public static final String GIT_BRANCH = "operator-controls";
public static final String BUILD_DATE = "2026-02-16 15:54:00 MST";
public static final long BUILD_UNIX_TIME = 1771282440915L;
public static final String BUILD_DATE = "2026-02-16 15:58:06 MST";
public static final long BUILD_UNIX_TIME = 1771282686680L;
public static final int DIRTY = 1;
private BuildConstants(){}
@@ -76,17 +76,20 @@ public class Intake extends SubsystemBase {
io.setRollerVelocity(state, RotationsPerSecond.of(0));
break;
case Extending:
io.armOutput(0.1);
io.armOutput(IntakeConstants.ARM_EXTEND_PERCENT_OUTPUT.get());
io.setRollerVelocity(state, RotationsPerSecond.of(IntakeConstants.ROLLER_ACTIVE.get()));
break;
case Retracting:
io.armOutput(-0.1);
io.armOutput(IntakeConstants.ARM_RETRACT_PERCENT_OUTPUT.get());
io.setRollerVelocity(state, RotationsPerSecond.of(0));
break;
case Idle:
case Idle:
io.stopArm();
break;
}
if (state.retractedLimit){
this.mode = IntakeMode.Retracted;
}
}
}
@@ -109,7 +109,7 @@ public class IntakeReal implements IntakeIO {
public void updateInputs(IntakeState state) {
state.armAngle = m_armMotor.getPosition().getValue().div(IntakeConstants.ARM_MOTOR_GEAR_RATIO);
state.armMotorCurrent = m_armMotor.getStatorCurrent().getValue();
state.retractedLimit = m_armLimitSwitch.get();
state.retractedLimit = !m_armLimitSwitch.get();
state.rollerVelocity = m_rollerMotor.getVelocity().getValue().div(IntakeConstants.ROLLER_MOTOR_GEAR_RATIO);
state.rollerMotorCurrent = m_rollerMotor.getStatorCurrent().getValue();
}