| 1 | package org.usfirst.frc.team3501.robot.subsystems; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Constants; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.DoubleSolenoid; |
| 6 | import edu.wpi.first.wpilibj.command.Subsystem; |
| 7 | |
| 8 | /*** |
| 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. |
| 13 | * |
| 14 | * @author superuser |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | public class Shooter extends Subsystem { |
| 19 | private DoubleSolenoid catapult1, catapult2; |
| 20 | |
| 21 | public Shooter() { |
| 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); |
| 28 | } |
| 29 | |
| 30 | // Catapult Commands |
| 31 | public void fireCatapult() { |
| 32 | catapult1.set(Constants.Shooter.shoot); |
| 33 | catapult2.set(Constants.Shooter.shoot); |
| 34 | } |
| 35 | |
| 36 | public void resetCatapult() { |
| 37 | catapult1.set(Constants.Shooter.reset); |
| 38 | catapult2.set(Constants.Shooter.reset); |
| 39 | } |
| 40 | |
| 41 | @Override |
| 42 | protected void initDefaultCommand() { |
| 43 | } |
| 44 | } |