mirror of
https://github.com/Team4388/2024AcrossTheRidgebotiverse.git
synced 2026-06-09 00:38:02 -06:00
Update
- Remove unneeded limelight stuff - Make base code for autoAlign - Need to test with robot
This commit is contained in:
@@ -19,12 +19,14 @@ import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import edu.wpi.first.wpilibj2.command.WaitUntilCommand;
|
||||
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||
import frc4388.robot.Constants.OIConstants;
|
||||
import frc4388.robot.commands.Autos.AutoAlign;
|
||||
import frc4388.robot.commands.Autos.PlaybackChooser;
|
||||
import frc4388.robot.commands.Swerve.JoystickPlayback;
|
||||
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;
|
||||
@@ -60,12 +62,15 @@ public class RobotContainer {
|
||||
/* Controllers */
|
||||
private final DeadbandedXboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID);
|
||||
private final DeadbandedXboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID);
|
||||
|
||||
/* Autos */
|
||||
private Limelight limelight = new Limelight();
|
||||
public AutoAlign autoAlign = new AutoAlign(m_robotSwerveDrive, limelight);
|
||||
|
||||
private Command taxi = new JoystickPlayback(m_robotSwerveDrive, "Taxi.txt");
|
||||
private Command MoveToSpeaker = new JoystickPlayback(m_robotSwerveDrive, "MoveToSpeaker.txt");
|
||||
private Command intakeToShootStuff = new ArmIntakeIn(m_robotIntake, m_robotShooter);
|
||||
|
||||
|
||||
|
||||
private SequentialCommandGroup intakeToShoot = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotIntake.pidIn()),
|
||||
new InstantCommand(() -> m_robotShooter.spin())
|
||||
@@ -82,6 +87,12 @@ public class RobotContainer {
|
||||
new InstantCommand(() -> m_robotShooter.spin(), m_robotShooter)
|
||||
);
|
||||
|
||||
private SequentialCommandGroup autoShoot = new SequentialCommandGroup(
|
||||
new RunCommand(() -> MoveToSpeaker.execute()),
|
||||
new RunCommand(() -> autoAlign.execute())
|
||||
);
|
||||
|
||||
|
||||
private SequentialCommandGroup i = new SequentialCommandGroup(
|
||||
intakeToShootStuff, intakeToShoot
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user