This commit is contained in:
Antoine PerreaultE
2025-02-22 14:46:41 -05:00
parent 26d32e3707
commit 7be5f8c2fc
10 changed files with 71 additions and 18 deletions

View File

@@ -20,6 +20,7 @@ import frc.robot.commands.L2;
import frc.robot.commands.L3;
import frc.robot.commands.L4;
import frc.robot.commands.PinceManuel;
import frc.robot.commands.PinceManuel2;
import frc.robot.commands.StationPince;
import frc.robot.subsystems.Elevateur;
import frc.robot.subsystems.Pince;
@@ -32,14 +33,15 @@ public class RobotContainer {
Pince pince = new Pince();
Elevateur elevateur = new Elevateur();
ElevateurManuel elevateurManuel = new ElevateurManuel(elevateur, manette2::getLeftY);
PinceManuel pinceManuel = new PinceManuel(pince, manette2::getRightY);
PinceManuel pinceManuel = new PinceManuel(pince);
PinceManuel2 pinceManuel2 = new PinceManuel2(pince);
public RobotContainer() {
configureBindings();
elevateur.setDefaultCommand(new RunCommand(()->{
elevateur.vitesse(MathUtil.applyDeadband(manette2.getLeftY(), 0.2));
}, elevateur));
pince.setDefaultCommand(new RunCommand(()->{
pince.pivote(MathUtil.applyDeadband(manette2.getRightY(), 0.2));
pince.pivote(MathUtil.applyDeadband(manette2.getRightY()/5, 0.2));
}, pince));
NamedCommands.registerCommand("Station",new StationPince(pince, elevateur));
NamedCommands.registerCommand("L4", new L4(elevateur, pince));
@@ -59,8 +61,9 @@ public class RobotContainer {
manette1.rightTrigger().whileTrue(new CoralAlgueInspire(pince, bougie));
manette1.rightBumper().whileTrue(new StationPince(pince, elevateur));
//manette2
manette2.leftTrigger().toggleOnTrue(new AlgueExpire(pince, bougie));
manette2.leftTrigger().whileTrue(new AlgueExpire(pince, bougie));
manette2.povUp().whileTrue(new PinceManuel(pince));
manette2.povDown().whileTrue(new PinceManuel2(pince));
}
public Command getAutonomousCommand() {