mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
New Ramp autos
This commit is contained in:
@@ -195,17 +195,17 @@ public class RobotContainer {
|
||||
|
||||
NamedCommands.registerCommand("BumpOffsetForward", new InstantCommand(() -> {
|
||||
if (TimesNegativeOne.isRed) {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED);
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED_FRONT);
|
||||
} else {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE);
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE_FRONT);
|
||||
}
|
||||
}));
|
||||
|
||||
NamedCommands.registerCommand("BumpOffsetReverse", new InstantCommand(() -> {
|
||||
if (!TimesNegativeOne.isRed) {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED);
|
||||
NamedCommands.registerCommand("BumpOffsetBackward", new InstantCommand(() -> {
|
||||
if (TimesNegativeOne.isRed) {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED_BACK);
|
||||
} else {
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE);
|
||||
m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_BLUE_BACK);
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -304,8 +304,8 @@ public class RobotContainer {
|
||||
FieldPositions.HUB_POSITION,
|
||||
ShooterConstants.AIM_LEAD_TIME.get()
|
||||
);
|
||||
}, m_robotSwerveDrive)
|
||||
);
|
||||
}, m_robotSwerveDrive))
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
// D-PAD fine alignment
|
||||
new Trigger(() -> getDeadbandedDriverController().getPOV() != -1)
|
||||
@@ -383,6 +383,18 @@ public class RobotContainer {
|
||||
m_robotIntake.setMode(IntakeMode.Idle);
|
||||
}));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.START_BUTTON)
|
||||
.whileTrue(
|
||||
new PathPlannerAuto("Right_AutoClimb")
|
||||
)
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.BACK_BUTTON)
|
||||
.whileTrue(
|
||||
new PathPlannerAuto("Left_AutoClimb")
|
||||
)
|
||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||
|
||||
// new JoystickButton(getDeadbandedOperatorController(), XboxController.B_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> {
|
||||
// m_robotClimber.toggleDeployed();
|
||||
@@ -395,11 +407,11 @@ public class RobotContainer {
|
||||
private void configureSINGLEBindings() {
|
||||
|
||||
//Driver controls
|
||||
// new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> m_robotSwerveDrive.resetGyro()));
|
||||
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED)));
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.resetGyro()));
|
||||
|
||||
// new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> m_robotSwerveDrive.offsetOdoPosition(FieldConstants.BUMP_OFFSET_RED)));
|
||||
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.shiftUp()));
|
||||
@@ -556,7 +568,8 @@ public class RobotContainer {
|
||||
|
||||
for (String auto : autos) {
|
||||
if (auto.endsWith(".auto"))
|
||||
autoChooser.addOption(auto.replaceAll(".auto", ""), auto.replaceAll(".auto", ""));
|
||||
if (auto.startsWith("X. "))
|
||||
autoChooser.addOption(auto.replaceAll(".auto", ""), auto.replaceAll(".auto", ""));
|
||||
// System.out.println(auto);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user