From: Cindy Zhang Date: Wed, 17 Feb 2016 19:08:59 +0000 (-0800) Subject: add second piston that controls hood, and change open/close values in constants X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=5930d874bede4f9a0734fa113b4791b6910ef8ab add second piston that controls hood, and change open/close values in constants --- diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index 7ee2d3b2..4ad8a4bf 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -112,8 +112,8 @@ public class Constants { public static final int HOOD_FORWARD = 2; public static final int HOOD_REVERSE = 3; - public static final Value open = Value.kForward; - public static final Value closed = Value.kReverse; + public static final Value open = Value.kReverse; + public static final Value closed = Value.kForward; public static final Port LIDAR_I2C_PORT = I2C.Port.kMXP; diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index 43aea899..69bff0bd 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -21,13 +21,15 @@ import edu.wpi.first.wpilibj.command.Subsystem; public class Shooter extends Subsystem { private CANTalon shooter; - private DoubleSolenoid hood, punch; + private DoubleSolenoid hood1, hood2, punch; private Encoder encoder; private Lidar lidar; public Shooter() { shooter = new CANTalon(Constants.Shooter.PORT); - hood = new DoubleSolenoid(Constants.Shooter.HOOD_FORWARD, + hood1 = new DoubleSolenoid(Constants.Shooter.HOOD_FORWARD, + Constants.Shooter.HOOD_REVERSE); + hood2 = new DoubleSolenoid(Constants.Shooter.HOOD_FORWARD, Constants.Shooter.HOOD_REVERSE); punch = new DoubleSolenoid(Constants.Shooter.PUNCH_FORWARD, Constants.Shooter.PUNCH_REVERSE); @@ -93,15 +95,17 @@ public class Shooter extends Subsystem { } public void raiseHood() { - hood.set(Constants.Shooter.open); + hood1.set(Constants.Shooter.open); + hood2.set(Constants.Shooter.open); } public void lowerHood() { - hood.set(Constants.Shooter.closed); + hood1.set(Constants.Shooter.closed); + hood2.set(Constants.Shooter.closed); } public boolean isHoodDown() { - if (hood.get() == Constants.Shooter.open) + if (hood1.get() == Constants.Shooter.open) return true; return false; }