Finish X position and PID position

This commit is contained in:
mimigamin
2026-03-14 18:57:04 -06:00
parent ebab028818
commit 8c8ac26139
7 changed files with 76 additions and 82 deletions
+14 -14
View File
@@ -233,21 +233,21 @@ public class RobotContainer {
//TEST - > Defense: X position on wheels and swerve drive pid on position
new JoystickButton(getDeadbandedDriverController(), XboxController.X_BUTTON)
.whileTrue(new RunCommand(() -> {
m_robotSwerveDrive.defenseXPosition();
}, m_robotSwerveDrive))
.onFalse(new InstantCommand(() -> {
m_robotSwerveDrive.stopDefenseXPosition();
// .onTrue(new InstantCommand(() -> {
// currentPose = m_robotSwerveDrive.getCurrentPose();
// }))
// .whileTrue(new RunCommand(() -> {
// m_stayInPosition.goToTargetPose(currentPose);
// .whileTrue(new RunCommand(() -> {
// m_robotSwerveDrive.defenseXPosition();
// }, m_robotSwerveDrive))
// .onFalse(new InstantCommand(() -> {
// m_robotSwerveDrive.softStop();
// }));
// .onFalse(new InstantCommand(() -> {
// m_robotSwerveDrive.stopDefenseXPosition();
.onTrue(new InstantCommand(() -> {
currentPose = m_robotSwerveDrive.getCurrentPose();
}))
.whileTrue(new RunCommand(() -> {
m_stayInPosition.goToTargetPose(currentPose);
}, m_robotSwerveDrive))
.onFalse(new InstantCommand(() -> {
m_robotSwerveDrive.softStop();
}));