mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 08:48:05 -06:00
control changes
This commit is contained in:
@@ -241,21 +241,36 @@ public class RobotContainer {
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
//Operator Controls
|
||||
// new Trigger(() -> getDeadbandedOperatorController().getRightTriggerAxis() >= 0.5)
|
||||
// .onTrue(new InstantCommand(() -> {
|
||||
// m_robotIntake.setMode(IntakeMode.Extended);
|
||||
// }));
|
||||
|
||||
|
||||
//allow shooting with right trigger
|
||||
new Trigger(() -> getDeadbandedOperatorController().getRightTriggerAxis() >= 0.5)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotShooter.allowShooting();
|
||||
})).onFalse(new InstantCommand(() -> {
|
||||
m_robotShooter.denyShooting();
|
||||
}));
|
||||
|
||||
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Extended);
|
||||
}));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Retracted);
|
||||
}));
|
||||
|
||||
|
||||
|
||||
|
||||
//set shooter ready (rev) with left trigger hold
|
||||
new Trigger(() -> getDeadbandedOperatorController().getLeftTriggerAxis() >= 0.5)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotShooter.spinUpShooting();
|
||||
m_robotIntake.setMode(IntakeMode.Idle);
|
||||
m_robotIntake.rollerStop();
|
||||
}))
|
||||
.onFalse(new InstantCommand(() -> {
|
||||
m_robotShooter.spinUpIdle();
|
||||
}));
|
||||
|
||||
@@ -275,9 +290,7 @@ public class RobotContainer {
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotShooter.allowShooting();
|
||||
})).onFalse(new InstantCommand(() -> {
|
||||
m_robotShooter.denyShooting();
|
||||
m_robotIntake.setMode(IntakeMode.Retracted);
|
||||
}));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
|
||||
|
||||
@@ -40,6 +40,10 @@ public class Intake extends SubsystemBase {
|
||||
return mode;
|
||||
}
|
||||
|
||||
public void rollerStop(){
|
||||
io.setRollerOutput(state, 0);
|
||||
}
|
||||
|
||||
|
||||
// public enum FieldZone {
|
||||
// // The robot should aim at the hub
|
||||
|
||||
Reference in New Issue
Block a user