mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 00:38:00 -06:00
Fixed Waiting Time
Co-Authored-By: Keenan D. Buckley <hfocus@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,9 @@ public class RobotContainer {
|
||||
private final XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID);
|
||||
private final XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID);
|
||||
|
||||
/* Autos */
|
||||
SixBallAutoMiddle m_sixBallAutoMiddle;
|
||||
|
||||
|
||||
/**
|
||||
* The container for the robot. Contains subsystems, OI devices, and commands.
|
||||
@@ -107,6 +110,9 @@ public class RobotContainer {
|
||||
|
||||
configureButtonBindings();
|
||||
|
||||
/* Builds Autos */
|
||||
buildAutos();
|
||||
|
||||
/* Default Commands */
|
||||
// drives the robot with a two-axis input from the driver controller
|
||||
|
||||
@@ -232,6 +238,14 @@ public class RobotContainer {
|
||||
.whenReleased(new InstantCommand(() -> m_robotLime.limeOff()));
|
||||
}
|
||||
|
||||
public void buildAutos() {
|
||||
String[] sixBallAutoMiddlePaths = new String[]{
|
||||
"FirstPath0",
|
||||
"FirstPath1"
|
||||
};
|
||||
m_sixBallAutoMiddle = new SixBallAutoMiddle(m_robotDrive, buildPaths(sixBallAutoMiddlePaths));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to pass the autonomous command to the main {@link Robot} class.
|
||||
*
|
||||
@@ -242,17 +256,9 @@ public class RobotContainer {
|
||||
TrajectoryConfig config = getTrajectoryConfig();
|
||||
//Trajectory trajectory = getTrajectory(config);
|
||||
|
||||
String trajectoryJSON0 = "paths/FirstPath0.wpilib.json";
|
||||
String trajectoryJSON1 = "paths/FirstPath1.wpilib.json";
|
||||
|
||||
String[] sixBallAutoMiddlePaths = new String[]{
|
||||
"FirstPath0",
|
||||
"FirstPath1"
|
||||
};
|
||||
|
||||
// Run path following command, then stop at the end.
|
||||
//SequentialCommandGroup ramseteCommands = new SequentialCommandGroup(ramseteCommand0, ramseteCommand1);
|
||||
return new SixBallAutoMiddle(buildPaths(sixBallAutoMiddlePaths)).andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
return m_sixBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
|
||||
|
||||
//return new AutoPath1FromCenter(m_robotDrive, m_robotPneumatics);
|
||||
//return new AutoPath2FromRight(m_robotDrive, m_robotPneumatics);
|
||||
|
||||
Reference in New Issue
Block a user