implement ShootAtHighGoal and add some helper methods
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Shooter.java
CommitLineData
a0c3ca74
KZ
1package org.usfirst.frc.team3501.robot.subsystems;
2
3import org.usfirst.frc.team3501.robot.Constants;
a0c3ca74 4
9b10474d 5import edu.wpi.first.wpilibj.DoubleSolenoid;
fee6b62e 6import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
a0c3ca74
KZ
7import edu.wpi.first.wpilibj.command.Subsystem;
8
27fac8ed 9/***
3b2038bb
ME
10 * The Shooter consists of a platform and wheel, each controlled by separate
11 * motors. The piston controlling the platform pushes the ball onto the wheel.
12 * The wheel is controlled by a motor, which is running before the ball is
13 * pushed onto the wheel. The spinning wheel propels the ball.
fee6b62e 14 *
27fac8ed 15 * @author superuser
fee6b62e 16 *
27fac8ed
YA
17 */
18
a0c3ca74 19public class Shooter extends Subsystem {
e4fbab02 20 private DoubleSolenoid catapult1, catapult2;
a0c3ca74
KZ
21
22 public Shooter() {
e4fbab02
HD
23 catapult1 = new DoubleSolenoid(Constants.Shooter.CATAPULT1_MODULE,
24 Constants.Shooter.CATAPULT1_FORWARD,
25 Constants.Shooter.CATAPULT1_REVERSE);
26 catapult2 = new DoubleSolenoid(Constants.Shooter.CATAPULT2_MODULE,
27 Constants.Shooter.CATAPULT2_FORWARD,
28 Constants.Shooter.CATAPULT2_REVERSE);
4b29730e
E
29 }
30
e4fbab02
HD
31 // Catapult Commands
32 public void fireCatapult() {
7988f380
HD
33 catapult1.set(Constants.Shooter.SHOOT);
34 catapult2.set(Constants.Shooter.SHOOT);
a0c3ca74
KZ
35 }
36
e4fbab02 37 public void resetCatapult() {
7988f380
HD
38 catapult1.set(Constants.Shooter.RESET);
39 catapult2.set(Constants.Shooter.RESET);
cc72c5b2
CZ
40 }
41
fee6b62e
ME
42 public Value getCatapult1State() {
43 return catapult1.get();
44 }
45
46 public Value getCatapult2State() {
47 return catapult2.get();
48 }
49
3b2038bb
ME
50 @Override
51 protected void initDefaultCommand() {
071ab315 52 }
a0c3ca74 53}