Integrate Storage Commands into Fire Commands

This commit is contained in:
Keenan D. Buckley
2020-03-08 13:50:39 -06:00
parent 0db12332dc
commit cc232cf574
3 changed files with 12 additions and 8 deletions
@@ -29,8 +29,8 @@ public class ShootFireGroup extends ParallelRaceGroup {
addCommands(
new RunCommand(() -> m_shooter.runDrumShooterVelocityPID(m_shooter.addFireVel()), m_shooter),
new RunCommand(() -> m_shooterHood.runAngleAdjustPID(m_shooterHood.addFireAngle()), m_shooterHood),
new TrackTarget(m_shooterAim)
//new StorageFire(m_storage)
new TrackTarget(m_shooterAim),
new StorageFire(m_storage)
);
}
}
@@ -44,8 +44,10 @@ public class StoragePrep extends CommandBase {
@Override
public boolean isFinished() {
if (!m_storage.getBeamShooter() || (startTime + StorageConstants.STORAGE_TIMEOUT) < System.currentTimeMillis()) {
m_storage.m_isStorageReadyToFire = true;
return true;
} else {
m_storage.m_isStorageReadyToFire = false;
return false;
}
}