Fixing the thing

This commit is contained in:
ryan123rudder
2020-02-25 17:44:59 -07:00
parent 371cc7ba4a
commit 716dc83480
6 changed files with 28 additions and 18 deletions
@@ -25,7 +25,7 @@ public class ShootFireGroup extends ParallelRaceGroup {
*/
public ShootFireGroup(Shooter m_shooter, ShooterAim m_shooterAim, Storage m_storage) {
addCommands(
new RunCommand(() -> m_shooter.runDrumShooterVelocityPID(m_shooter.addFireVel(), m_shooter.m_shooterFalcon.getSelectedSensorVelocity())),
new RunCommand(() -> m_shooter.runDrumShooterVelocityPID(7000, m_shooter.m_shooterFalcon.getSelectedSensorVelocity())),
new RunCommand(() -> m_shooter.runAngleAdjustPID(m_shooter.addFireAngle())),
new HoldTarget(m_shooter, m_shooterAim)
//new StorageRun(m_storage)
@@ -26,7 +26,7 @@ public class ShootPrepGroup extends ParallelCommandGroup {
public ShootPrepGroup(Shooter m_shooter, ShooterAim m_shooterAim, Storage m_storage) {
addCommands(
new TrackTarget(m_shooter, m_shooterAim),
new ShooterVelocityControlPID(m_shooter, m_shooter.addFireVel())
new ShooterVelocityControlPID(m_shooter)
//new StoragePrepAim(m_storage)
);
}
@@ -19,23 +19,22 @@ public class ShooterVelocityControlPID extends CommandBase {
* @param subsystem The Shooter subsytem
* @param targetVel The target velocity
*/
public ShooterVelocityControlPID(Shooter subsystem, double targetVel) {
public ShooterVelocityControlPID(Shooter subsystem) {
m_shooter = subsystem;
m_targetVel = targetVel;
addRequirements(m_shooter);
}
// Called when the command is initially scheduled.
@Override
public void initialize() {
}
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
m_shooter.runDrumShooterVelocityPID(m_targetVel, m_shooter.m_shooterFalcon.getSelectedSensorVelocity());
m_shooter.runDrumShooterVelocityPID(7000, m_shooter.m_shooterFalcon.getSelectedSensorVelocity());
m_shooter.runAngleAdjustPID(m_shooter.addFireAngle());
m_actualVel = m_shooter.m_shooterFalcon.getSelectedSensorVelocity();
}
// Called once the command ends or is interrupted.