Added code to help intake run in between the path

This commit is contained in:
ryan123rudder
2021-02-05 14:27:50 -07:00
parent cbc0c9443c
commit 26b56c8c21
2 changed files with 24 additions and 2 deletions
@@ -52,6 +52,7 @@ import frc4388.robot.commands.drive.DriveStraightAtVelocityPID;
import frc4388.robot.commands.drive.DriveStraightToPositionMM;
import frc4388.robot.commands.drive.DriveWithJoystick;
import frc4388.robot.commands.drive.TurnDegrees;
import frc4388.robot.commands.intake.RunIntake;
import frc4388.robot.commands.intake.RunIntakeWithTriggers;
import frc4388.robot.commands.shooter.CalibrateShooter;
import frc4388.robot.commands.shooter.TrackTarget;
@@ -111,6 +112,10 @@ public class RobotContainer {
SixBallAutoMiddle m_sixBallAutoMiddle;
SixBallAutoMiddle m_sixBallAuto0;
SixBallAutoMiddle m_sixBallAuto1;
FigureEight m_figureEight;
EightBallAutoMiddle m_eightBallAutoMiddle;
@@ -281,6 +286,18 @@ public class RobotContainer {
m_sixBallAutoMiddle = new SixBallAutoMiddle(m_robotDrive, buildPaths(sixBallAutoMiddlePaths));
String[] sixBallAutoMiddle0 = new String[]{
"SixBallMid0"
};
m_sixBallAuto0 = new SixBallAutoMiddle(m_robotDrive, buildPaths(sixBallAutoMiddle0));
String[] sixBallAutoMiddle1 = new String[]{
"SixBallMid1"
};
m_sixBallAuto1 = new SixBallAutoMiddle(m_robotDrive, buildPaths(sixBallAutoMiddle1));
String[] figureEight = new String[]{
"FigureEight"
};
@@ -333,7 +350,7 @@ public class RobotContainer {
try {
SmartDashboard.putNumber("Trajectory Total Time", m_totalTimeAuto);
return m_sixBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
return m_sixBallAutoMiddle.andThen(m_sixBallAuto1);
//return m_figureEight.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
//return m_eightBallAutoMiddle.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
//return m_driveOffLineForward.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
@@ -15,7 +15,9 @@ import edu.wpi.first.wpilibj.trajectory.TrajectoryUtil;
import edu.wpi.first.wpilibj2.command.RamseteCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc4388.robot.RobotContainer;
import frc4388.robot.commands.intake.RunIntake;
import frc4388.robot.subsystems.Drive;
import frc4388.robot.subsystems.Intake;
// NOTE: Consider using this command inline, rather than writing a subclass. For more
// information, see:
@@ -27,9 +29,12 @@ public class SixBallAutoMiddle extends SequentialCommandGroup {
public SixBallAutoMiddle(Drive drive, RamseteCommand[] paths) {
// Add your commands in the super() call, e.g.
// super(new FooCommand(), new BarCommand());
Intake m_intake = new Intake();
addCommands(
paths[0]
paths[0],
new RunIntake(m_intake)//,
//paths[1]
);
}
}