gfhg jha
This commit is contained in:
parent
3b22a181cc
commit
bded54b8c5
@ -64,7 +64,7 @@ public class RobotContainer {
|
|||||||
GenericEntry reculerdistances = layoutauto.addPersistent("reculerdistancesortir", -66).getEntry();
|
GenericEntry reculerdistances = layoutauto.addPersistent("reculerdistancesortir", -66).getEntry();
|
||||||
GenericEntry reculerdistanceb = layoutauto.addPersistent("reculerdistancebalance", -31).getEntry();
|
GenericEntry reculerdistanceb = layoutauto.addPersistent("reculerdistancebalance", -31).getEntry();
|
||||||
GenericEntry avancerdistance = layoutauto.addPersistent("avancer", 35).getEntry();
|
GenericEntry avancerdistance = layoutauto.addPersistent("avancer", 35).getEntry();
|
||||||
|
|
||||||
// subsystems
|
// subsystems
|
||||||
BasePilotable basePilotable = new BasePilotable();
|
BasePilotable basePilotable = new BasePilotable();
|
||||||
Gratte gratte = new Gratte();
|
Gratte gratte = new Gratte();
|
||||||
@ -110,8 +110,8 @@ public class RobotContainer {
|
|||||||
private void configureBindings() {
|
private void configureBindings() {
|
||||||
// manette 1
|
// manette 1
|
||||||
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
|
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
|
||||||
manette1.x().onTrue(brakeOuvre);
|
manette2.a().onTrue(brakeOuvre);
|
||||||
manette1.b().onTrue(brakeFerme);
|
manette2.b().onTrue(brakeFerme);
|
||||||
manette1.leftBumper().whileTrue(aprilTag);
|
manette1.leftBumper().whileTrue(aprilTag);
|
||||||
manette1.rightBumper().whileTrue(tape);
|
manette1.rightBumper().whileTrue(tape);
|
||||||
manette1.povUp().whileTrue(creerCommandBras(51, -37));
|
manette1.povUp().whileTrue(creerCommandBras(51, -37));
|
||||||
@ -126,8 +126,8 @@ public class RobotContainer {
|
|||||||
manette2.leftBumper().whileTrue(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);
|
manette1.b().whileTrue(gratteMonte);
|
||||||
manette2.b().whileTrue(gratteBaisser);
|
manette1.x().whileTrue(gratteBaisser);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Command creerCommandBras(double distancePivot, double distanceBras) {
|
private Command creerCommandBras(double distancePivot, double distanceBras) {
|
||||||
|
@ -28,11 +28,11 @@ public class Bougerbras extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if(brasTelescopique.distance()>distance+0.5 ) {
|
if(brasTelescopique.distance()>distance+0.5 ) {
|
||||||
brasTelescopique.AvanceRecule(-0.3);
|
brasTelescopique.AvanceRecule(-0.35);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(brasTelescopique.distance()<distance-0.5) {
|
else if(brasTelescopique.distance()<distance-0.5) {
|
||||||
brasTelescopique.AvanceRecule(0.3);
|
brasTelescopique.AvanceRecule(0.35);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
brasTelescopique.AvanceRecule(0);
|
brasTelescopique.AvanceRecule(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user