Skip to content

Commit

Permalink
feat: working on button bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezgonzalezl committed Feb 14, 2024
1 parent 4f123fb commit 3802c15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions src/main/java/org/team1540/robot2024/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,17 @@
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import org.littletonrobotics.junction.Logger;
import org.littletonrobotics.junction.networktables.LoggedDashboardChooser;
import org.team1540.robot2024.Constants.Elevator.ElevatorState;
import org.team1540.robot2024.commands.FeedForwardCharacterization;
import org.team1540.robot2024.commands.DriveWithSpeakerTargetingCommand;
import org.team1540.robot2024.commands.SwerveDriveCommand;
import org.team1540.robot2024.commands.TrampShoot;
import org.team1540.robot2024.commands.autos.AmpLanePABCSprint;
import org.team1540.robot2024.commands.autos.SourceLanePHGFSprint;
import org.team1540.robot2024.commands.climb.ClimbSequence;
import org.team1540.robot2024.commands.climb.DeclimbSequence;
import org.team1540.robot2024.commands.elevator.ElevatorManualCommand;
import org.team1540.robot2024.commands.elevator.ElevatorSetpointCommand;
import org.team1540.robot2024.commands.indexer.IntakeCommand;
import org.team1540.robot2024.commands.indexer.StageTrampCommand;
import org.team1540.robot2024.commands.shooter.ManualShooterCommand;
import org.team1540.robot2024.commands.shooter.ManualPivotCommand;
import org.team1540.robot2024.commands.shooter.PrepareShooterCommand;
import org.team1540.robot2024.commands.shooter.ShootSequence;
import org.team1540.robot2024.commands.autos.*;
import org.team1540.robot2024.subsystems.drive.*;
import org.team1540.robot2024.subsystems.elevator.Elevator;
import org.team1540.robot2024.subsystems.elevator.ElevatorIO;
Expand Down Expand Up @@ -247,7 +242,7 @@ private void configureButtonBindings() {
// copilot left and right trigger -> elevator up and down
elevator.setDefaultCommand(new ElevatorManualCommand(elevator, copilot));
// copilot left y -> shooter angle
shooter.setDefaultCommand(new ManualShooterCommand(shooter, copilot));
shooter.setDefaultCommand(new ManualPivotCommand(shooter, copilot));
// copilot left and right bumper -> climb up climb down
copilot.leftBumper().onTrue(new ClimbSequence(elevator, hook));
copilot.rightBumper().onTrue(new DeclimbSequence(elevator, hook));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import org.team1540.robot2024.subsystems.shooter.Shooter;

public class ManualShooterCommand extends Command{
public class ManualPivotCommand extends Command{
private final Shooter shooter;
private final CommandXboxController controller;

public ManualShooterCommand(Shooter shooter, CommandXboxController controller) {
public ManualPivotCommand(Shooter shooter, CommandXboxController controller) {
this.shooter = shooter;
addRequirements(shooter);
this.controller = controller;
Expand Down

0 comments on commit 3802c15

Please sign in to comment.