X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FDecreaseShootingSpeed.java;h=3bd4efd7490e7462306cbe05fb75ebff63c15516;hp=23ac1a82d3f0fcabeb53e8d9305f06ce89e4f4a0;hb=ad7e6b1e386d82e35d6049e211b7c1ae3efe705d;hpb=ca372ce8e1ede3b2967ae6f42c539db4eeb812fc diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java index 23ac1a8..3bd4efd 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java @@ -1,5 +1,8 @@ package org.usfirst.frc.team3501.robot.commands.shooter; +import org.usfirst.frc.team3501.robot.Robot; +import org.usfirst.frc.team3501.robot.subsystems.Shooter; + import edu.wpi.first.wpilibj.command.Command; /** @@ -10,35 +13,35 @@ import edu.wpi.first.wpilibj.command.Command; * flywheel is run, it will run at the decreased shooting speed */ public class DecreaseShootingSpeed extends Command { + private Shooter shooter = Robot.getShooter(); + public DecreaseShootingSpeed() { } - // Called just before this Command runs the first time @Override protected void initialize() { + shooter.CURRENT_SHOOTING_SPEED -= shooter.SHOOTING_SPEED_INCREMENT; + } - // Called repeatedly when this Command is scheduled to run @Override protected void execute() { } - // Called once after isFinished returns true @Override protected void end() { } - // Called when another command which requires one or more of the same - // subsystems is scheduled to run @Override protected void interrupted() { + end(); } @Override protected boolean isFinished() { - // TODO Auto-generated method stub - return false; + return true; + } }