Commit | Line | Data |
---|---|---|
a0c3ca74 KZ |
1 | package org.usfirst.frc.team3501.robot.subsystems; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Constants; | |
a0c3ca74 | 4 | |
9b10474d | 5 | import edu.wpi.first.wpilibj.DoubleSolenoid; |
a0c3ca74 KZ |
6 | import edu.wpi.first.wpilibj.command.Subsystem; |
7 | ||
27fac8ed | 8 | /*** |
3b2038bb ME |
9 | * The Shooter consists of a platform and wheel, each controlled by separate |
10 | * motors. The piston controlling the platform pushes the ball onto the wheel. | |
11 | * The wheel is controlled by a motor, which is running before the ball is | |
12 | * pushed onto the wheel. The spinning wheel propels the ball. | |
e4fbab02 | 13 | * |
27fac8ed | 14 | * @author superuser |
e4fbab02 | 15 | * |
27fac8ed YA |
16 | */ |
17 | ||
a0c3ca74 | 18 | public class Shooter extends Subsystem { |
e4fbab02 | 19 | private DoubleSolenoid catapult1, catapult2; |
a0c3ca74 KZ |
20 | |
21 | public Shooter() { | |
e4fbab02 HD |
22 | catapult1 = new DoubleSolenoid(Constants.Shooter.CATAPULT1_MODULE, |
23 | Constants.Shooter.CATAPULT1_FORWARD, | |
24 | Constants.Shooter.CATAPULT1_REVERSE); | |
25 | catapult2 = new DoubleSolenoid(Constants.Shooter.CATAPULT2_MODULE, | |
26 | Constants.Shooter.CATAPULT2_FORWARD, | |
27 | Constants.Shooter.CATAPULT2_REVERSE); | |
4b29730e E |
28 | } |
29 | ||
e4fbab02 HD |
30 | // Catapult Commands |
31 | public void fireCatapult() { | |
32 | catapult1.set(Constants.Shooter.shoot); | |
33 | catapult2.set(Constants.Shooter.shoot); | |
a0c3ca74 KZ |
34 | } |
35 | ||
e4fbab02 HD |
36 | public void resetCatapult() { |
37 | catapult1.set(Constants.Shooter.reset); | |
38 | catapult2.set(Constants.Shooter.reset); | |
cc72c5b2 CZ |
39 | } |
40 | ||
3b2038bb ME |
41 | @Override |
42 | protected void initDefaultCommand() { | |
071ab315 | 43 | } |
a0c3ca74 | 44 | } |