X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FRunIndexWheelContinuous.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FRunIndexWheelContinuous.java;h=e86f3ee03f5ec364538de5d033bd2d3ab1057362;hb=2d810c3cff74251a39ae4899f3e87bfe982e0702;hp=ab46b3fa39f1ca974889abb6f74a87ba89218f43;hpb=669451502e414a323e1be3ae72a490fae00cc0c7;p=3501%2F2017steamworks diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java index ab46b3f..e86f3ee 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java @@ -1,8 +1,8 @@ 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; @@ -30,23 +30,26 @@ public class RunIndexWheelContinuous extends Command { */ public RunIndexWheelContinuous() { requires(shooter); - // t.start(); } // Called just before this Command runs the first time @Override protected void initialize() { - t.reset(); + t.start(); } // Called repeatedly when this Command is scheduled to run @Override protected void execute() { - /* - * if (t.get() >= 4) { 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(); if (shooterSpeed > 0)