Skip to content

Commit

Permalink
Add more testing controls
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed Feb 13, 2024
1 parent 55eed20 commit cd5e1cd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/java/frc/robot/Controls.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;
import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction;
import frc.robot.Constants.Intake.IntakePosition;
import frc.robot.subsystems.Climber;
import frc.robot.subsystems.Drivetrain;
Expand All @@ -18,7 +19,7 @@ public class Controls {
private static double speedMultiplier = 1.0;

public static void configureDriverControl(int port, Drivetrain drivetrain, Intake intake, Shooter shooter,
ShooterTilt shooterTilt, Climber climber, NoteLift noteLift, LEDs leds) {
ShooterTilt shooterTilt, Climber climber, NoteLift noteLift) {
CommandVirpilJoystick joystick = new CommandVirpilJoystick(port);

drivetrain.setDefaultCommand(
Expand Down Expand Up @@ -57,7 +58,7 @@ public static void configureDriverControl(int port, Drivetrain drivetrain, Intak
}

public static void configureTestingControl(int port, Drivetrain drivetrain, Intake intake, Shooter shooter,
ShooterTilt shooterTilt, Climber climber, NoteLift noteLift, LEDs leds) {
ShooterTilt shooterTilt, Climber climber, NoteLift noteLift) {
CommandXboxController controller = new CommandXboxController(port);

controller.x().whileTrue(shooterTilt
Expand All @@ -67,6 +68,16 @@ public static void configureTestingControl(int port, Drivetrain drivetrain, Inta
controller.a().whileTrue(intake
.setOverridenSpeedCommand(() -> controller.getRightTriggerAxis() - controller.getLeftTriggerAxis()));
controller.b().whileTrue(intake.runRollersCommand());

controller.povLeft().whileTrue(climber
.setOverridenSpeedCommand(() -> controller.getRightTriggerAxis() - controller.getLeftTriggerAxis()));
controller.povRight().whileTrue(noteLift
.setOverridenSpeedCommand(() -> controller.getRightTriggerAxis() - controller.getLeftTriggerAxis()));

// controller.x().whileTrue(intake.sysIdQuasistatic(Direction.kForward));
// controller.y().whileTrue(intake.sysIdQuasistatic(Direction.kReverse));
// controller.a().whileTrue(intake.sysIdDynamic(Direction.kForward));
// controller.b().whileTrue(intake.sysIdDynamic(Direction.kReverse));
}

}

0 comments on commit cd5e1cd

Please sign in to comment.