package org.usfirst.frc.team3501.robot.commands.shooter;
-import org.usfirst.frc.team3501.robot.Constants;
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
-
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
@Override
protected void initialize() {
- t.reset();
+ t.start();
}
@Override
protected void execute() {
- if (t.get() % 1 == 0) {
- if (Shooter.getShooter().getPistonValue() == Constants.Shooter.LOW_GEAR) {
- Shooter.getShooter().setHighGear();
- } else {
- Shooter.getShooter().setLowGear();
- }
- }
+ /*
+ * if (t.get() >= 1) { if (Shooter.getShooter().getPistonValue() ==
+ * Constants.Shooter.LOW_GEAR) { Shooter.getShooter().setHighGear(); } else
+ * { Shooter.getShooter().setLowGear(); } t.reset(); }
+ */
- double shooterSpeed = shooter.getShooterRPM();
- double targetShooterSpeed = shooter.getTargetShootingSpeed();
- double threshold = shooter.getRPMThreshold();
- if (Math.abs(shooterSpeed - targetShooterSpeed) <= threshold)
+ // if (shooter.isShooterRPMWithinRangeOfTargetSpeed(25))
+ if (shooter.getShooterRPM() > 0)
shooter.runIndexWheel();
+
}
@Override