From 618ba75eae419414237e1b700ec01ba8d951d0fb Mon Sep 17 00:00:00 2001 From: Cherriae Date: Wed, 11 Sep 2024 17:04:58 -0400 Subject: [PATCH] ps4 controller for interest meeting --- src/main/java/frc/robot/RobotContainer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index d6e85ee..9930715 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -14,6 +14,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; +import edu.wpi.first.wpilibj2.command.button.CommandPS4Controller; import edu.wpi.first.wpilibj2.command.button.CommandPS5Controller; import frc.robot.Constants.LEDColors; import frc.robot.Constants.Ports; @@ -62,7 +63,7 @@ public class RobotContainer { // controllers (for driver and operator) private final CommandPS5Controller _driveController = new CommandPS5Controller(Constants.Ports.DRIVER_CONTROLLER); - private final CommandPS5Controller _operatorController = new CommandPS5Controller(Constants.Ports.OPERATOR_CONTROLLER); + private final CommandPS4Controller _operatorController = new CommandPS4Controller(Constants.Ports.OPERATOR_CONTROLLER); // slew rate limiters applied to joysticks private final SlewRateLimiter _driveFilterLeftX = new SlewRateLimiter(4); @@ -153,7 +154,7 @@ private void configureBindings() { // operator bindings _operatorController.L1().whileTrue(new SpinShooter(_shooterSubsystem, ShooterState.AMP)); // _operatorController.L2().whileTrue(new SpinShooter(_shooterSubsystem, ShooterState.AMP)); - _operatorController.create().whileTrue(new SpinShooter(_shooterSubsystem, ShooterState.SLOW)); + _operatorController.share().whileTrue(new SpinShooter(_shooterSubsystem, ShooterState.SLOW)); _operatorController.R2().whileTrue(new AutoAmp(_shooterSubsystem, _intakeSubsystem)); _operatorController.R1().whileTrue( Commands.parallel(