Commit | Line | Data |
---|---|---|
0ceab9a4 M |
1 | package org.usfirst.frc.team3501.robot.subsystems; |
2 | ||
c9eb0d1c AD |
3 | import org.usfirst.frc.team3501.robot.Constants; |
4 | ||
dab6e7d6 AD |
5 | import com.ctre.CANTalon; |
6 | ||
0ceab9a4 M |
7 | import edu.wpi.first.wpilibj.command.Subsystem; |
8 | ||
dab6e7d6 | 9 | /** |
66b47d2c AD |
10 | * Intakes the balls into ball container. |
11 | * | |
0ceab9a4 | 12 | * @author Meeta |
0ceab9a4 M |
13 | */ |
14 | public class Intake extends Subsystem { | |
dab6e7d6 | 15 | public static Intake intake = null; |
dab6e7d6 | 16 | private CANTalon intakeWheel; |
c1aabfdd | 17 | public static final double INTAKE_SPEED = 0; |
0ceab9a4 | 18 | |
dab6e7d6 | 19 | public Intake() { |
c9eb0d1c | 20 | intakeWheel = new CANTalon(Constants.Intake.INTAKE_ROLLER_PORT); |
0ceab9a4 M |
21 | } |
22 | ||
66b47d2c AD |
23 | /*** |
24 | * It gets the intake instance, and if intake has not been initialized, then | |
25 | * it will be initialized. | |
26 | * | |
27 | * @returns intake | |
28 | */ | |
dab6e7d6 AD |
29 | public static Intake getIntake() { |
30 | if (intake == null) { | |
31 | intake = new Intake(); | |
32 | } | |
33 | return intake; | |
0ceab9a4 M |
34 | } |
35 | ||
36 | @Override | |
37 | protected void initDefaultCommand() { | |
0ceab9a4 M |
38 | |
39 | } | |
40 | ||
66b47d2c AD |
41 | /*** |
42 | * Sets speed of intake wheel to input speed | |
43 | * | |
44 | * @param speed | |
45 | * from -1 to 1 | |
46 | */ | |
dab6e7d6 | 47 | public void setSpeed(double speed) { |
c9eb0d1c | 48 | intakeWheel.set(speed); |
dab6e7d6 AD |
49 | } |
50 | ||
0ceab9a4 | 51 | } |