mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-08 16:28:05 -06:00
operator intake and shooting
added operator controls
This commit is contained in:
@@ -152,7 +152,7 @@ public class RobotContainer {
|
||||
*/
|
||||
private void configureButtonBindings() {
|
||||
|
||||
|
||||
//Driver controls
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.resetGyro()));
|
||||
|
||||
@@ -210,31 +210,30 @@ public class RobotContainer {
|
||||
false
|
||||
);
|
||||
}, m_robotSwerveDrive))
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Extended);
|
||||
}))
|
||||
.onFalse(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Retracted);
|
||||
m_robotSwerveDrive.softStop();
|
||||
}));
|
||||
// .onTrue(new InstantCommand(() -> {
|
||||
// m_robotIntake.setMode(IntakeMode.Extended);
|
||||
// }))
|
||||
|
||||
// IF the driver is holding the aim button, aim the robot towards the hub and shooter ready
|
||||
new Trigger(() -> getDeadbandedDriverController().getRightTriggerAxis() >= 0.5)
|
||||
.whileTrue(new RunCommand(
|
||||
() -> {
|
||||
// m_robotSwerveDrive.driveFacingPosition(
|
||||
// getDeadbandedDriverController().getLeft(),
|
||||
// FieldPositions.HUB_POSITION);
|
||||
m_robotSwerveDrive.driveFacingPosition(
|
||||
getDeadbandedDriverController().getLeft(),
|
||||
FieldPositions.HUB_POSITION);
|
||||
}, m_robotSwerveDrive)
|
||||
)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
// When Right trigger is pressed,
|
||||
m_robotShooter.setShooterReady();
|
||||
}))
|
||||
.onFalse(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Retracted);
|
||||
m_robotShooter.setShooterNotReady();
|
||||
}));
|
||||
);
|
||||
// .onTrue(new InstantCommand(() -> {
|
||||
// // When Right trigger is pressed,
|
||||
// m_robotShooter.setShooterReady();
|
||||
// }))
|
||||
// .onFalse(new InstantCommand(() -> {
|
||||
// m_robotIntake.setMode(IntakeMode.Retracted);
|
||||
// m_robotShooter.setShooterNotReady();
|
||||
// }));
|
||||
|
||||
|
||||
// D-PAD fine alignment
|
||||
@@ -248,6 +247,30 @@ public class RobotContainer {
|
||||
getDeadbandedDriverController().getRight(), 0.15
|
||||
), m_robotSwerveDrive))
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
//Operator Controls
|
||||
new Trigger(() -> getDeadbandedOperatorController().getLeftTriggerAxis() >= 0.5)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Extended);
|
||||
}));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.LEFT_BUMPER_BUTTON)
|
||||
.onFalse(new InstantCommand(() -> {
|
||||
m_robotIntake.setMode(IntakeMode.Retracted);
|
||||
}));
|
||||
|
||||
new Trigger(() -> getDeadbandedOperatorController().getRightTriggerAxis() >= 0.5)
|
||||
.onTrue(new InstantCommand(() -> {
|
||||
m_robotShooter.setShooterReady();
|
||||
}));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
.onFalse(new InstantCommand(() -> {
|
||||
m_robotShooter.setShooterNotReady();
|
||||
}));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//.onTrue(new InstantCommand(() -> m_robotLED.setMode(LEDPatterns.SOLID_PINK_HOT)));
|
||||
|
||||
@@ -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 = 49;
|
||||
public static final String GIT_SHA = "0425cdd0a1e794109348c7369dc21b377fca569b";
|
||||
public static final String GIT_DATE = "2026-02-12 14:36:26 MST";
|
||||
public static final String GIT_BRANCH = "shoot-button";
|
||||
public static final String BUILD_DATE = "2026-02-14 11:48:31 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771094911048L;
|
||||
public static final int GIT_REVISION = 50;
|
||||
public static final String GIT_SHA = "8381ac460776aaad24a82786c9fe12e040a99d00";
|
||||
public static final String GIT_DATE = "2026-02-14 11:55:51 MST";
|
||||
public static final String GIT_BRANCH = "operator-controls";
|
||||
public static final String BUILD_DATE = "2026-02-14 12:11:59 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771096319898L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
Reference in New Issue
Block a user