Rework Command Groups to use Prep Checker

This commit is contained in:
Keenan D. Buckley
2020-03-03 01:12:07 -07:00
parent 1b603d4f5d
commit 9288d2b934
13 changed files with 105 additions and 140 deletions
@@ -7,7 +7,10 @@
package frc4388.robot.commands.shooter;
import edu.wpi.first.wpilibj2.command.CommandBase;
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
import edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup;
import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
import edu.wpi.first.wpilibj2.command.RunCommand;
import frc4388.robot.commands.storage.StoragePrepAim;
import frc4388.robot.subsystems.Shooter;
@@ -18,20 +21,21 @@ import frc4388.robot.subsystems.Storage;
// NOTE: Consider using this command inline, rather than writing a subclass. For more
// information, see:
// https://docs.wpilib.org/en/latest/docs/software/commandbased/convenience-features.html
public class ShootPrepGroup extends ParallelCommandGroup {
public class ShootPrepGroup extends ParallelDeadlineGroup {
/**
* Prepares the Shooter to be fired
* @param m_shooter The Shooter subsytem
* @param m_shooterAim The ShooterAim subsystem
* @param m_storage The Storage subsytem
*/
public ShootPrepGroup(Shooter m_shooter, ShooterAim m_shooterAim, ShooterHood m_shooterHood, Storage m_storage) {
addCommands(
public ShootPrepGroup(Shooter m_shooter, ShooterAim m_shooterAim, ShooterHood m_shooterHood, Storage m_storage) {
super(
new PrepChecker(m_shooter, m_storage),
new TrackTarget(m_shooterAim),
new ShooterVelocityControlPID(m_shooter),
new HoodPositionPID(m_shooterHood),
//new RunCommand(() -> m_shooter.runDrumShooterVelocityPID(m_shooter.addFireVel())),
new StoragePrepAim(m_storage)
//new RunCommand(() -> m_shooter.runDrumShooterVelocityPID(m_shooter.addFireVel())),
);
}
}