This commit is contained in:
Antoine PerreaultE 2023-03-07 18:40:45 -05:00
parent af2f0bb61b
commit bcc8ef7f8e
3 changed files with 11 additions and 4 deletions

View File

@ -76,7 +76,6 @@ public RobotContainer() {
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable));
manette1.y().whileTrue(gyro);
// manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte));
manette1.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable));
manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte));
// manette 2
@ -87,7 +86,7 @@ public RobotContainer() {
manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique));
manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique));
manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null));
manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));
manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));
}

View File

@ -9,6 +9,7 @@ import frc.robot.subsystems.Gratte;
public class GratteBaisser extends CommandBase {
private Gratte gratte;
private int vitesse;
/** Creates a new GratteBaisser. */
public GratteBaisser(Gratte gratte) {
this.gratte = gratte;
@ -41,7 +42,9 @@ public class GratteBaisser extends CommandBase {
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {}
public void end(boolean interrupted) {
}
// Returns true when the command should end.
@Override

View File

@ -25,6 +25,7 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb")
private DigitalInput limithg = new DigitalInput(Constants.limithg);
private DigitalInput limitbd = new DigitalInput(Constants.limitbd);
private DigitalInput limitbg = new DigitalInput(Constants.limitbg);
public boolean baiser;
public boolean hautd(){
return limithd.get();
@ -34,7 +35,7 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb")
return limithg.get();
}
public boolean basd(){
public boolean basd(int i, String string){
return limitbd.get();
}
public boolean basg(){
@ -61,4 +62,8 @@ ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb")
limitswitchgratte.add ("limithd", 0.1);
limitswitchgratte.add ("limitbg", 0.1);
}
public boolean basd() {
return false;
}
}