Add Intake and Shooter Subsystems

This commit is contained in:
Abhishrek05
2024-01-20 10:10:17 -07:00
parent d56140d366
commit 502f7a979a
5 changed files with 113 additions and 37 deletions
@@ -18,6 +18,8 @@ import frc4388.robot.commands.Swerve.JoystickPlayback;
import frc4388.robot.commands.Swerve.JoystickRecorder;
import frc4388.robot.subsystems.LED;
import frc4388.robot.subsystems.SwerveDrive;
import frc4388.robot.subsystems.Shooter;
import frc4388.robot.subsystems.Intake;
import frc4388.utility.controller.DeadbandedXboxController;
import frc4388.utility.controller.XboxController;
@@ -41,6 +43,9 @@ public class RobotContainer {
m_robotMap.rightBack,
m_robotMap.gyro);
private final Shooter m_robotShooter = new Shooter(m_robotMap.leftShooter, m_robotMap.rightShooter);
private final Intake m_robotIntake = new Intake(m_robotMap.intakeMotor);
/* Controllers */
private final DeadbandedXboxController m_driverXbox = new DeadbandedXboxController(OIConstants.XBOX_DRIVER_ID);
@@ -105,8 +110,12 @@ public class RobotContainer {
new JoystickButton(getDeadbandedDriverController(), XboxController.LEFT_BUMPER_BUTTON) // final
.onTrue(new InstantCommand(() -> m_robotSwerveDrive.setToSlow()));
/* Operator Buttons */
// activates "Lit Mode"s
/* Operator Buttons */
new JoystickButton(getDeadbandedDriverController(), XboxController.A_BUTTON)
.onTrue(new InstantCommand(() -> m_robotShooter.spin(), m_robotShooter))
.onFalse(new InstantCommand(() -> m_robotShooter.stop(), m_robotShooter));
}