Merge branch 'main' of https://demerso.net/pls5618/2023/robot
This commit is contained in:
commit
58e6f51a22
@ -88,8 +88,8 @@ public class RobotContainer {
|
|||||||
Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY());
|
Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY());
|
||||||
Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY());
|
Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY());
|
||||||
Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY());
|
Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY());
|
||||||
PivotManuel pivotManuel = new PivotManuel(pivot, manette2::getRightY);
|
PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getLeftY);
|
||||||
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette2::getLeftX);
|
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getLeftX);
|
||||||
|
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
chooser.addOption(enhaut, enhaut);
|
chooser.addOption(enhaut, enhaut);
|
||||||
@ -110,18 +110,19 @@ public class RobotContainer {
|
|||||||
// manette 1
|
// manette 1
|
||||||
//y lumiere limelight, manuel 2e joystik,
|
//y lumiere limelight, manuel 2e joystik,
|
||||||
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
|
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
|
||||||
manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable));
|
manette1.x().onTrue(brakeOuvre);
|
||||||
manette1.leftBumper().toggleOnTrue(aprilTag);
|
manette1.b().onTrue(brakeFerme);
|
||||||
manette1.rightBumper().toggleOnTrue(tape);
|
manette1.leftBumper().whileTrue(aprilTag);
|
||||||
|
manette1.rightBumper().whileTrue(tape);
|
||||||
manette1.povUp().whileTrue(creerCommandBras(51, -40));
|
manette1.povUp().whileTrue(creerCommandBras(51, -40));
|
||||||
manette1.povDown().whileTrue(creerCommandBras(0, 0));
|
manette1.povDown().whileTrue(creerCommandBras(9, -14));
|
||||||
manette1.povRight().whileTrue(creerCommandBras(0, 0));
|
manette1.povRight().whileTrue(creerCommandBras(44, -17));
|
||||||
manette1.povLeft().whileTrue(creerCommandBras(0, 0));
|
manette1.povLeft().whileTrue(creerCommandBras(0, 0));
|
||||||
//manette 2
|
//manette 2
|
||||||
manette2.povDown().onTrue(pivotChercheBas);
|
manette2.povDown().whileTrue(creerCommandBras(9, -18));
|
||||||
manette2.povUp().onTrue(pivotChercheHaut);
|
manette2.povUp().whileTrue(creerCommandBras(44, 0));
|
||||||
manette2.rightBumper().toggleOnTrue(cube);
|
manette2.rightBumper().whileTrue(cube);
|
||||||
manette2.leftBumper().toggleOnTrue(cone);
|
manette2.leftBumper().whileTrue(cone);
|
||||||
manette2.y().whileTrue(gyro);
|
manette2.y().whileTrue(gyro);
|
||||||
manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro));
|
manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro));
|
||||||
manette2.a().whileTrue(gratteMonte);
|
manette2.a().whileTrue(gratteMonte);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user