From: Cindy Zhang Date: Thu, 18 Feb 2016 20:56:29 +0000 (-0800) Subject: add default speed for shooter in constants, and apply in runShooter command X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=ec8219166ae1b90c692d44e8d1d3435ba5cd6fba add default speed for shooter in constants, and apply in runShooter command --- diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index 37f77e41..862459d6 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -112,6 +112,8 @@ public class Constants { public static final int HOOD_FORWARD = 2; public static final int HOOD_REVERSE = 3; + public static final double DEFAULT_SHOOTER_SPEED = 0.5; + public static final Value open = Value.kReverse; public static final Value closed = Value.kForward; diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java index 4315ae19..c7b0cf2f 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/runShooter.java @@ -1,5 +1,6 @@ package org.usfirst.frc.team3501.robot.commands.shooter; +import org.usfirst.frc.team3501.robot.Constants; import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; @@ -15,7 +16,7 @@ public class runShooter extends Command { @Override protected void initialize() { - Robot.shooter.setSpeed(0.5); + Robot.shooter.setSpeed(Constants.Shooter.DEFAULT_SHOOTER_SPEED); } @Override