Skip to content

Commit

Permalink
Removed unneeded driver binds
Browse files Browse the repository at this point in the history
  • Loading branch information
IanTapply22 committed Jan 4, 2024
1 parent e391c3c commit fc8f5c3
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,14 @@ private class Controller {
.withDeadband(DriveConstants.kMaxAngularRate * 0.1).withRotationalDeadband(DriveConstants.kMaxAngularRate * 0.1)
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);

private final SwerveRequest.SwerveDriveBrake brake = new SwerveRequest.SwerveDriveBrake();
private final SwerveRequest.RobotCentric forwardStraight = new SwerveRequest.RobotCentric()
.withDriveRequestType(DriveRequestType.OpenLoopVoltage);
private final SwerveRequest.PointWheelsAt point = new SwerveRequest.PointWheelsAt();

/* Path follower */
private Command runAuto = drivetrain.getAutoPath("Tests");

private final Telemetry logger = new Telemetry(DriveConstants.kMaxSpeed);

private void configureBindings() {
ledSubsystem.setDefaultCommand(new InstantCommand(() -> ledSubsystem.periodic(), ledSubsystem));
drivetrain.registerTelemetry(logger::telemeterize);

drivetrain.setDefaultCommand(
drivetrain
Expand All @@ -55,22 +51,6 @@ private void configureBindings() {
// (left)
)
.ignoringDisable(true));

Controller.driver.greenButton().whileTrue(drivetrain.applyRequest(() -> brake));
Controller.driver
.yellowButton()
.whileTrue(
drivetrain.applyRequest(
() -> point.withModuleDirection(
new Rotation2d(-Controller.driver.getLeftY(), -Controller.driver.getLeftX()))));

drivetrain.registerTelemetry(logger::telemeterize);
Controller.driver.POVUp()
.whileTrue(
drivetrain.applyRequest(() -> forwardStraight.withVelocityX(0.5).withVelocityY(0)));
Controller.driver.POVDown()
.whileTrue(
drivetrain.applyRequest(() -> forwardStraight.withVelocityX(-0.5).withVelocityY(0)));
}

public RobotContainer() {
Expand Down

0 comments on commit fc8f5c3

Please sign in to comment.