diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 6c34c5ff..a2ca30c6 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -9,6 +9,7 @@ import java.nio.file.Path; import java.util.function.BooleanSupplier; +import java.util.function.DoubleSupplier; import static frc.robot.settings.Constants.DriveConstants.*; @@ -67,6 +68,7 @@ import edu.wpi.first.math.MathUtil; import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.math.kinematics.ChassisSpeeds; +import edu.wpi.first.units.Angle; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.PS4Controller; import frc.robot.commands.ManualShoot; @@ -109,6 +111,7 @@ public class RobotContainer { private IndexerSubsystem indexer; private SendableChooser climbSpotChooser; private SendableChooser autoChooser; + private DoubleSupplier angleSup; // Replace with CommandPS4Controller or CommandJoystick if needed /** The container for the robot. Contains subsystems, OI devices, and commands. */ @@ -226,7 +229,12 @@ private void configureBindings() { new Trigger(driverController::getCircleButton).onTrue(new CollectNote(driveTrain, limelight)); new Trigger(driverController::getTouchpadPressed).onTrue(new InstantCommand(driveTrain::stop, driveTrain)); - if(shooterExists) {new Trigger(operatorController::getCircleButton).onTrue(new ManualShoot(shooter));} + if(shooterExists) { + new Trigger(operatorController::getCircleButton).onTrue(new ManualShoot(shooter)); + AngleShooter shooterUpCommand = new AngleShooter(angleShooterSubsystem, () -> Constants.ShooterConstants.shooterup); + new Trigger(driverController::getL1Button).onTrue(shooterUpCommand); + SmartDashboard.putData("Manual Angle Shooter Up", shooterUpCommand); + } if(climberExists) { new Trigger(operatorController::getCrossButton).onTrue(new AutoClimb(climber)).onFalse(new InstantCommand(()-> climber.climberStop())); new Trigger(operatorController::getTriangleButton).onTrue(new InstantCommand(()-> climber.climberGo(ClimberConstants.CLIMBER_SPEED_UP))).onFalse(new InstantCommand(()-> climber.climberStop())); diff --git a/src/main/java/frc/robot/settings/Constants.java b/src/main/java/frc/robot/settings/Constants.java index 0cd17b3a..18dc6ddb 100644 --- a/src/main/java/frc/robot/settings/Constants.java +++ b/src/main/java/frc/robot/settings/Constants.java @@ -284,6 +284,7 @@ public static final class ShooterConstants{ public static final double pitchFeedForward = 2491; public static final double pitchMaxOutput = 2491; public static final double pitchMinOutput = 2491; + public static final double shooterup = 2491; } public static final class ClimberConstants{