This commit is contained in:
EdwardFaucher 2023-03-20 19:17:21 -04:00
parent 627b365cda
commit 25a11282e5
2 changed files with 8 additions and 8 deletions

View File

@ -88,8 +88,8 @@ public class RobotContainer {
Cube cube = new Cube(limelight, basePilotable, () -> manette1.getLeftY());
Apriltag aprilTag = new Apriltag(limelight, basePilotable, () -> manette1.getLeftY());
Tape tape = new Tape(limelight, basePilotable, () -> manette1.getLeftY());
PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getLeftY);
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getLeftX);
PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getRightY);
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getRightX);
public RobotContainer() {
chooser.addOption(enhaut, enhaut);
@ -118,8 +118,8 @@ public class RobotContainer {
manette1.povRight().whileTrue(creerCommandBras(44, -17));
manette1.povLeft().whileTrue(creerCommandBras(0, 0));
// manette 2
manette2.povDown().onTrue(creerCommandBras(9, -18));
manette2.povUp().onTrue(creerCommandBras(44, 0));
manette2.povDown().whileTrue(creerCommandBras(9, -18));
manette2.povUp().whileTrue(creerCommandBras(44, 0));
manette2.rightBumper().whileTrue(cube);
manette2.leftBumper().whileTrue(cone);
manette2.y().whileTrue(gyro);

View File

@ -29,21 +29,21 @@ public class PivoteBrasHaut extends CommandBase {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
if(brasTelescopique.distance()>-39.5){
if(brasTelescopique.distance()>-36.5){
brasTelescopique.AvanceRecule(-0.15);
brasTelescopique.fermer();
}
else if(brasTelescopique.distance()<-41.5) {
else if(brasTelescopique.distance()<-37.5) {
brasTelescopique.AvanceRecule(-0.15);
}
else {
brasTelescopique.AvanceRecule(0);
brasTelescopique.ouvrir();
}
if (pivot.distance()<50.5){
if (pivot.distance()<52.5){
pivot.monteDescendre(0.5);
}
else if(pivot.distance()>52.5) {
else if(pivot.distance()>53.5) {
pivot.monteDescendre(-0.5);
}
else{