mirror of
https://github.com/Team4388/2024AcrossTheRidgebotiverse.git
synced 2026-06-09 00:38:02 -06:00
Lots of bs (im geekin)
This commit is contained in:
@@ -25,6 +25,7 @@ import frc4388.robot.commands.Swerve.JoystickRecorder;
|
||||
import frc4388.robot.commands.Intake.ArmIntakeIn;
|
||||
import frc4388.robot.commands.Intake.RotateIntakeToPosition;
|
||||
import frc4388.robot.subsystems.LED;
|
||||
import frc4388.robot.subsystems.Limelight;
|
||||
import frc4388.robot.subsystems.SwerveDrive;
|
||||
import frc4388.robot.subsystems.Shooter;
|
||||
import frc4388.robot.subsystems.Intake;
|
||||
@@ -61,11 +62,9 @@ public class RobotContainer {
|
||||
private final DeadbandedXboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID);
|
||||
private final DeadbandedXboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID);
|
||||
|
||||
private Command taxi = new JoystickPlayback(m_robotSwerveDrive, "Taxi.txt");
|
||||
private Limelight limelight = new Limelight();
|
||||
private Command intakeToShootStuff = new ArmIntakeIn(m_robotIntake, m_robotShooter);
|
||||
|
||||
|
||||
|
||||
private SequentialCommandGroup intakeToShoot = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotIntake.pidIn()),
|
||||
new InstantCommand(() -> m_robotShooter.spin())
|
||||
@@ -96,13 +95,34 @@ public class RobotContainer {
|
||||
new InstantCommand(() -> m_robotIntake.stopIntakeMotors(), m_robotIntake)
|
||||
);
|
||||
|
||||
|
||||
/* Autos */
|
||||
private Command taxi = new JoystickPlayback(m_robotSwerveDrive, "Taxi.txt");
|
||||
private Command startLeftMoveRight = new JoystickPlayback(m_robotSwerveDrive, "StartLeftMoveRight.txt");
|
||||
private Command startRightMoveLeft = new JoystickPlayback(m_robotSwerveDrive, "StartRightMoveLeft.txt");
|
||||
|
||||
|
||||
private SequentialCommandGroup oneNoteStartingSpeaker = new SequentialCommandGroup (
|
||||
ejectToShoot,
|
||||
taxi
|
||||
);
|
||||
private SequentialCommandGroup oneNoteStartingFromLeft = new SequentialCommandGroup(
|
||||
startLeftMoveRight,
|
||||
ejectToShoot,
|
||||
taxi
|
||||
);
|
||||
private SequentialCommandGroup oneNoteStartingFromRight = new SequentialCommandGroup(
|
||||
startRightMoveLeft,
|
||||
ejectToShoot,
|
||||
taxi
|
||||
);
|
||||
|
||||
private PlaybackChooser playbackChooser = new PlaybackChooser(m_robotSwerveDrive)
|
||||
.addOption("Taxi Auto", new JoystickPlayback(m_robotSwerveDrive, "Taxi.txt"))
|
||||
.addOption("Taxi Auto", taxi)
|
||||
.addOption("One Note Auto Starting in Front of Speaker", oneNoteStartingSpeaker)
|
||||
.addOption("One Note Auto Starting from Left Position", oneNoteStartingFromLeft)
|
||||
.addOption("One Note Auto Starting from Right Position", oneNoteStartingFromRight)
|
||||
.buildDisplay();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The container for the robot. Contains subsystems, OI devices, and commands.
|
||||
@@ -122,7 +142,7 @@ public class RobotContainer {
|
||||
m_robotLED.setDefaultCommand(new RunCommand(() -> m_robotLED.updateLED(), m_robotLED));
|
||||
|
||||
|
||||
SmartDashboard.putNumber("Velocity Output", m_robotIntake.getVelocity());
|
||||
// SmartDashboard.putNumber("Velocity Output", m_robotIntake.getVelocity());
|
||||
|
||||
// m_robotIntake.resetPostion();
|
||||
}
|
||||
@@ -177,10 +197,19 @@ public class RobotContainer {
|
||||
.onTrue(new InstantCommand(() -> m_robotIntake.pidIn()))
|
||||
.onFalse(new InstantCommand(() -> m_robotIntake.stopArmMotor()));
|
||||
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotIntake.pidOut()))
|
||||
.onFalse(new InstantCommand(() -> m_robotIntake.stopArmMotor()));
|
||||
|
||||
|
||||
// Override Intake Position encoder: out
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.BACK_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotIntake.setPosition(-53), m_robotIntake));
|
||||
|
||||
// Override Intake Position encoder: out
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.START_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotIntake.setPosition(0), m_robotIntake));
|
||||
|
||||
// //Pull arm in
|
||||
// new JoystickButton(getDeadbandedOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
|
||||
// .onTrue(new InstantCommand(() -> m_robotIntake.pidIn(), m_robotIntake))
|
||||
@@ -202,7 +231,7 @@ public class RobotContainer {
|
||||
// .onFalse(new InstantCommand(() -> m_robotIntake.stopIntakeMotors(), m_robotIntake));
|
||||
|
||||
//Spin Shooter Motors
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
|
||||
.onTrue(new InstantCommand(() -> m_robotShooter.spin(), m_robotShooter))
|
||||
.onFalse(new InstantCommand(() -> m_robotShooter.stop(), m_robotShooter));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user