Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Shooter up button on controller and smartdash board #41

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -109,6 +111,7 @@ public class RobotContainer {
private IndexerSubsystem indexer;
private SendableChooser<String> climbSpotChooser;
private SendableChooser<Command> autoChooser;
private DoubleSupplier angleSup;
// Replace with CommandPS4Controller or CommandJoystick if needed

/** The container for the robot. Contains subsystems, OI devices, and commands. */
Expand Down Expand Up @@ -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()));
Expand Down
1 change: 1 addition & 0 deletions src/main/java/frc/robot/settings/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
Loading