This commit is contained in:
EdwardFaucher 2023-03-20 19:24:26 -04:00
parent bc0f4c4e9a
commit 991703ce73
3 changed files with 6 additions and 15 deletions

View File

@ -88,14 +88,9 @@ 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());
<<<<<<< HEAD
PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getRightY); PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getRightY);
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getRightX); BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getRightX);
=======
PivotManuel pivotManuel = new PivotManuel(pivot, manette1::getLeftY);
BrasManuel brasManuel = new BrasManuel(brasTelescopique, manette1::getLeftX);
ActiverLimeLight activerLimeLight = new ActiverLimeLight(limelight); ActiverLimeLight activerLimeLight = new ActiverLimeLight(limelight);
>>>>>>> 1da49837db76e3ae31f03d0e1593aec704cc02df
public RobotContainer() { public RobotContainer() {
chooser.addOption(enhaut, enhaut); chooser.addOption(enhaut, enhaut);
@ -123,12 +118,8 @@ public class RobotContainer {
manette1.povDown().whileTrue(creerCommandBras(9, -14)); manette1.povDown().whileTrue(creerCommandBras(9, -14));
manette1.povRight().whileTrue(creerCommandBras(44, -17)); manette1.povRight().whileTrue(creerCommandBras(44, -17));
manette1.povLeft().whileTrue(creerCommandBras(0, 0)); manette1.povLeft().whileTrue(creerCommandBras(0, 0));
<<<<<<< HEAD
// manette 2
=======
manette1.y().whileTrue(activerLimeLight); manette1.y().whileTrue(activerLimeLight);
//manette 2 //manette 2
>>>>>>> 1da49837db76e3ae31f03d0e1593aec704cc02df
manette2.povDown().whileTrue(creerCommandBras(9, -18)); manette2.povDown().whileTrue(creerCommandBras(9, -18));
manette2.povUp().whileTrue(creerCommandBras(44, 0)); manette2.povUp().whileTrue(creerCommandBras(44, 0));
manette2.rightBumper().whileTrue(cube); manette2.rightBumper().whileTrue(cube);

View File

@ -31,21 +31,21 @@ public class PivoteBrasBas extends CommandBase {
// Called every time the scheduler runs while the command is scheduled. // Called every time the scheduler runs while the command is scheduled.
@Override @Override
public void execute() { public void execute() {
if(brasTelescopique.distance()>-13.5){ if(brasTelescopique.distance()>-8.5){
brasTelescopique.AvanceRecule(-0.2); brasTelescopique.AvanceRecule(-0.2);
brasTelescopique.fermer(); brasTelescopique.fermer();
} }
else if(brasTelescopique.distance()<-15.5) { else if(brasTelescopique.distance()<-9.5) {
brasTelescopique.AvanceRecule(0.2); brasTelescopique.AvanceRecule(0.2);
} }
else { else {
brasTelescopique.AvanceRecule(0); brasTelescopique.AvanceRecule(0);
brasTelescopique.ouvrir(); brasTelescopique.ouvrir();
} }
if (pivot.distance()<8.5){ if (pivot.distance()<12.5){
pivot.monteDescendre(0.4); pivot.monteDescendre(0.4);
} }
else if(pivot.distance()>10.5) { else if(pivot.distance()>13.5) {
pivot.monteDescendre(-0.4); pivot.monteDescendre(-0.4);
} }
else{ else{

View File

@ -29,11 +29,11 @@ public class PivoteBrasMilieux extends CommandBase {
// Called every time the scheduler runs while the command is scheduled. // Called every time the scheduler runs while the command is scheduled.
@Override @Override
public void execute() { public void execute() {
if(brasTelescopique.distance()>-16.5){ if(brasTelescopique.distance()>-12.5){
brasTelescopique.AvanceRecule(-0.15); brasTelescopique.AvanceRecule(-0.15);
brasTelescopique.fermer(); brasTelescopique.fermer();
} }
else if(brasTelescopique.distance()<-17.5) { else if(brasTelescopique.distance()<-13.5) {
brasTelescopique.AvanceRecule(0.15); brasTelescopique.AvanceRecule(0.15);
} }
else { else {