From ec8219166ae1b90c692d44e8d1d3435ba5cd6fba Mon Sep 17 00:00:00 2001 From: Cindy Zhang Date: Thu, 18 Feb 2016 12:56:29 -0800 Subject: [PATCH] add default speed for shooter in constants, and apply in runShooter command --- src/org/usfirst/frc/team3501/robot/Constants.java | 2 ++ .../frc/team3501/robot/commands/shooter/runShooter.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- 2.30.2