mode auto
This commit is contained in:
parent
887c4e2d95
commit
999eaae0a0
@ -92,21 +92,7 @@ public class RobotContainer {
|
|||||||
*/
|
*/
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
// An ExampleCommand will run in autonomous
|
// An ExampleCommand will run in autonomous
|
||||||
return null;
|
return new Avancer(basePilotable, SmartDashboard.getNumber("AvancerVit",0)).withTimeout(SmartDashboard.getNumber("avancer", 1));
|
||||||
/**(
|
|
||||||
new Reculer(basePilotable).withTimeout(SmartDashboard.getNumber("temps reculer", 1)),
|
|
||||||
new TournerGauche(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne gauche1",1)),
|
|
||||||
new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avencer1",1)),
|
|
||||||
new TournerDroite(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne droite1",1)),
|
|
||||||
new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avancer2",1)),
|
|
||||||
new TournerGauche(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne gauche2",1)),
|
|
||||||
new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avancer3",1)),
|
|
||||||
new TournerDroite(basePilotable).withTimeout(SmartDashboard.getNumber("temps tourne droite 2",1)),
|
|
||||||
new Avancer(basePilotable).withTimeout(SmartDashboard.getNumber("temps avancer4",1)),
|
|
||||||
new DesactiverBlockeur(poussoir).withTimeout(SmartDashboard.getNumber("temps du b1",0.8)),
|
|
||||||
new Activer_poussoir(poussoir).withTimeout(SmartDashboard.getNumber("temps pousser1",1)),
|
|
||||||
new Activershaker(pistonshaker).withTimeout(SmartDashboard.getNumber("temps du b2",1)),
|
|
||||||
new Activer_poussoir(poussoir).withTimeout(SmartDashboard.getNumber("temps pousser2",1))); */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,11 @@ import frc.robot.subsystems.BasePilotable;
|
|||||||
|
|
||||||
public class Avancer extends CommandBase {
|
public class Avancer extends CommandBase {
|
||||||
private BasePilotable basePilotable;
|
private BasePilotable basePilotable;
|
||||||
|
private double vitesse;
|
||||||
/** Creates a new Avancer. */
|
/** Creates a new Avancer. */
|
||||||
public Avancer(BasePilotable basePilotable) {
|
public Avancer(BasePilotable basePilotable, double vitesse) {
|
||||||
basePilotable = new BasePilotable();
|
this.basePilotable = basePilotable;
|
||||||
|
this.vitesse = vitesse;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
addRequirements(basePilotable);
|
addRequirements(basePilotable);
|
||||||
}
|
}
|
||||||
@ -23,7 +25,8 @@ public class Avancer 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() {
|
||||||
basePilotable.drive(0.5, 0.5, 0);
|
basePilotable.drive(vitesse, 0, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user