This commit is contained in:
Antoine PerreaultE 2023-02-15 19:36:03 -05:00
commit b20ba544a8
4 changed files with 9 additions and 3 deletions

View File

@ -27,6 +27,7 @@ import frc.robot.commands.BrakeOuvre;
import frc.robot.commands.GratteBaisser; import frc.robot.commands.GratteBaisser;
import frc.robot.commands.GratteMonte; import frc.robot.commands.GratteMonte;
import frc.robot.commands.Gyro; import frc.robot.commands.Gyro;
import frc.robot.commands.Reculer;
import frc.robot.commands.bras.FermePince; import frc.robot.commands.bras.FermePince;
import frc.robot.commands.bras.OuvrePince; import frc.robot.commands.bras.OuvrePince;
import frc.robot.commands.bras.PivotBrasRentre; import frc.robot.commands.bras.PivotBrasRentre;
@ -77,6 +78,11 @@ public RobotContainer() {
public Command getAutonomousCommand() { public Command getAutonomousCommand() {
return Commands.print("No autonomous command configured"); return Commands.print("No autonomous command configured");
return new SequentialCommandGroup(
new PivoteBrasMilieux(brasTelescopique, pivot),
new OuvrePince(pince),
new PivotBrasRentre(brasTelescopique, pivot).alongWith(new Reculer(basePilotable)),
new Gyro(basePilotable)
);
} }
} }

View File

@ -26,7 +26,7 @@ public class Reculer 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.2, 0, 10, basePilotable); basePilotable.drive(0.2, 0, 0);
} }
// Called once the command ends or is interrupted. // Called once the command ends or is interrupted.

View File

@ -32,7 +32,7 @@ public class BasePilotable extends SubsystemBase {
return gyroscope.getPitch(); return gyroscope.getPitch();
} }
public void drive(double xSpeed, double zRotation, double d, BasePilotable basePilotable){ public void drive(double xSpeed, double zRotation, double d){
drive.arcadeDrive(xSpeed, zRotation); drive.arcadeDrive(xSpeed, zRotation);
} }
public double distance(){ public double distance(){