Full sequence possibly working, Full turret working

This commit is contained in:
ryan123rudder
2020-02-29 21:03:19 -07:00
parent 5da6ce766e
commit eb129c6b34
8 changed files with 26 additions and 19 deletions
@@ -36,8 +36,7 @@ public class StoragePrepIntake extends CommandBase {
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
System.err.println(m_storage.getBeam(0));
if (m_storage.getBeam(0)){//&& System.currentTimeMillis() < startTime + 3000){ //If the bottom beam is broken, or 3 seconds have passed
if (m_storage.getBeam(0)){
m_storage.runStorage(-StorageConstants.STORAGE_SPEED);
}
else{
@@ -53,7 +52,7 @@ public class StoragePrepIntake extends CommandBase {
// Returns true when the command should end.
@Override
public boolean isFinished() {
if (!m_storage.getBeam(0)){
if (!m_storage.getBeam(0) || startTime + 2000 <= System.currentTimeMillis()){
return true;
}
return false;