idifjkeakjfo h
This commit is contained in:
parent
59a7c30154
commit
a73b9c7374
@ -6,7 +6,6 @@ package frc.robot;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import edu.wpi.first.cameraserver.CameraServer;
|
||||
import edu.wpi.first.networktables.GenericEntry;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts;
|
||||
@ -50,6 +49,7 @@ import frc.robot.commands.bras.MonterPivotBras;
|
||||
import frc.robot.commands.bras.OuvrePince;
|
||||
import frc.robot.commands.bras.PivotManuel;
|
||||
import frc.robot.commands.ActiverLimeLight;
|
||||
|
||||
public class RobotContainer {
|
||||
|
||||
CommandXboxController manette1 = new CommandXboxController(0);
|
||||
@ -156,14 +156,17 @@ public class RobotContainer {
|
||||
Map.entry(aumilieux, creerCommandBras(45, -13)),
|
||||
Map.entry(enbas, creerCommandBras(12, -9)),
|
||||
Map.entry(nulpart, creerCommandBras(0, 0))), chooser::getSelected),
|
||||
//creerCommandBras(50, -40).unless(() -> !chooser.getSelected().equals(enhaut)),
|
||||
//creerCommandBras(51, -40).unless(() -> !chooser.getSelected().equals(enhaut)),
|
||||
// creerCommandBras(50, -40).unless(() ->
|
||||
// !chooser.getSelected().equals(enhaut)),
|
||||
// creerCommandBras(51, -40).unless(() ->
|
||||
// !chooser.getSelected().equals(enhaut)),
|
||||
new OuvrePince(pince).unless(() -> chooser.getSelected().equals(nulpart)),
|
||||
Commands.waitSeconds(1),
|
||||
new FermePince(pince).unless(() -> chooser.getSelected().equals(nulpart)),
|
||||
new ParallelCommandGroup(creerCommandBras(0, 0).unless(() -> chooser.getSelected().equals(nulpart)),
|
||||
Commands.either(reculers, reculerb, () -> autosortir.getBoolean(true))),
|
||||
new Avancer(basePilotable, () -> avancerdistance.getDouble(0),()->avancerforce.getDouble(0)).unless(() -> !autosortir.getBoolean(true) || !autobalance.getBoolean(false)),
|
||||
new Avancer(basePilotable, () -> avancerdistance.getDouble(0), () -> avancerforce.getDouble(0))
|
||||
.unless(() -> !autosortir.getBoolean(true) || !autobalance.getBoolean(false)),
|
||||
Commands.either(gyro, Commands.none(), () -> autobalance.getBoolean(true))))
|
||||
.andThen(brakeOuvre);
|
||||
|
||||
|
@ -30,11 +30,11 @@ public class Bougerbras extends CommandBase {
|
||||
@Override
|
||||
public void execute() {
|
||||
if(brasTelescopique.distance()>distance+0.5 ) {
|
||||
brasTelescopique.AvanceRecule(0.35);
|
||||
brasTelescopique.AvanceRecule(-0.35);
|
||||
|
||||
}
|
||||
else if(brasTelescopique.distance()<distance-0.5) {
|
||||
brasTelescopique.AvanceRecule(-0.35);
|
||||
brasTelescopique.AvanceRecule(0.35);
|
||||
}
|
||||
else {
|
||||
brasTelescopique.AvanceRecule(0);
|
||||
|
@ -27,10 +27,10 @@ public class Bougerpivot extends CommandBase {
|
||||
@Override
|
||||
public void execute() {
|
||||
if(pivot.distance()>distance+0.5 ) {
|
||||
pivot.monteDescendre(0.5);
|
||||
pivot.monteDescendre(-0.5);
|
||||
}
|
||||
else if(pivot.distance()<distance-0.5) {
|
||||
pivot.monteDescendre(-0.5);
|
||||
pivot.monteDescendre(0.5);
|
||||
}
|
||||
else {
|
||||
pivot.monteDescendre(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user