1 package org
.usfirst
.frc
.team3501
.robot
.subsystems
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
5 import edu
.wpi
.first
.wpilibj
.DoubleSolenoid
;
6 import edu
.wpi
.first
.wpilibj
.command
.Subsystem
;
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.
18 public class Shooter
extends Subsystem
{
19 private DoubleSolenoid catapult1
, catapult2
;
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
);
31 public void fireCatapult() {
32 catapult1
.set(Constants
.Shooter
.SHOOT
);
33 catapult2
.set(Constants
.Shooter
.SHOOT
);
36 public void resetCatapult() {
37 catapult1
.set(Constants
.Shooter
.RESET
);
38 catapult2
.set(Constants
.Shooter
.RESET
);
42 protected void initDefaultCommand() {