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