Bras telesco v3
This commit is contained in:
parent
8a62c68f8c
commit
e13375bc90
@ -115,12 +115,12 @@ public class RobotContainer {
|
||||
manette1.leftBumper().whileTrue(aprilTag);
|
||||
manette1.rightBumper().whileTrue(tape);
|
||||
manette1.povUp().whileTrue(creerCommandBras(51, -37));
|
||||
manette1.povDown().whileTrue(creerCommandBras(9, -12));
|
||||
manette1.povDown().whileTrue(creerCommandBras(12, -9));
|
||||
manette1.povRight().whileTrue(creerCommandBras(45, -13));
|
||||
manette1.povLeft().whileTrue(creerCommandBras(0, 0));
|
||||
manette1.y().whileTrue(activerLimeLight);
|
||||
//manette 2
|
||||
manette2.povDown().whileTrue(creerCommandBras(9, -18));
|
||||
manette2.povDown().whileTrue(creerCommandBras(5, -12));
|
||||
manette2.povUp().whileTrue(creerCommandBras(44, 0));
|
||||
manette2.rightBumper().whileTrue(cube);
|
||||
manette2.leftBumper().whileTrue(cone);
|
||||
@ -128,7 +128,6 @@ public class RobotContainer {
|
||||
manette2.start().onTrue(new InstantCommand(basePilotable::resetGyro));
|
||||
manette2.a().whileTrue(gratteMonte);
|
||||
manette2.b().whileTrue(gratteBaisser);
|
||||
|
||||
}
|
||||
|
||||
private Command creerCommandBras(double distancePivot, double distanceBras) {
|
||||
@ -142,12 +141,13 @@ public class RobotContainer {
|
||||
chooser.getSelected();
|
||||
autobalance.getBoolean(true);
|
||||
return Commands.deadline(
|
||||
Commands.waitSeconds(14),
|
||||
Commands.waitSeconds(14),
|
||||
new SequentialCommandGroup(
|
||||
Commands.select(Map.ofEntries(
|
||||
Map.entry(enhaut, creerCommandBras(51, -40)),
|
||||
Map.entry(aumilieux, creerCommandBras(9, -14)),
|
||||
Map.entry(enbas, creerCommandBras(44, -17)),
|
||||
Map.entry(aumilieux, creerCommandBras(45, -13)),
|
||||
Map.entry(enbas, creerCommandBras(12, -9)),
|
||||
Map.entry(nulpart, creerCommandBras(0, 0))), chooser::getSelected),
|
||||
new OuvrePince(pince).unless(() -> chooser.getSelected().equals(nulpart)),
|
||||
Commands.waitSeconds(1),
|
||||
|
@ -25,11 +25,11 @@ public class Gyro extends CommandBase {
|
||||
public void execute() {
|
||||
if(basePilotable.getpitch()>6)
|
||||
{
|
||||
basePilotable.drive(0.3*basePilotable.getpitch()/12, 0);
|
||||
basePilotable.drive(0.4*basePilotable.getpitch()/12, 0);
|
||||
}
|
||||
else if(basePilotable.getpitch()<-6)
|
||||
{
|
||||
basePilotable.drive(0.3*basePilotable.getpitch()/12, 0);
|
||||
basePilotable.drive(0.4*basePilotable.getpitch()/12, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user