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 | /** |
0ceab9a4 | 10 | * @author Meeta |
0ceab9a4 M |
11 | */ |
12 | public class Intake extends Subsystem { | |
dab6e7d6 | 13 | public static Intake intake = null; |
dab6e7d6 | 14 | private CANTalon intakeWheel; |
c1aabfdd | 15 | public static final double INTAKE_SPEED = 0; |
0ceab9a4 | 16 | |
dab6e7d6 | 17 | public Intake() { |
c9eb0d1c | 18 | intakeWheel = new CANTalon(Constants.Intake.INTAKE_ROLLER_PORT); |
0ceab9a4 M |
19 | } |
20 | ||
66b47d2c AD |
21 | /*** |
22 | * It gets the intake instance, and if intake has not been initialized, then | |
23 | * it will be initialized. | |
24 | * | |
25 | * @returns intake | |
26 | */ | |
dab6e7d6 AD |
27 | public static Intake getIntake() { |
28 | if (intake == null) { | |
29 | intake = new Intake(); | |
30 | } | |
31 | return intake; | |
0ceab9a4 M |
32 | } |
33 | ||
34 | @Override | |
35 | protected void initDefaultCommand() { | |
0ceab9a4 M |
36 | |
37 | } | |
38 | ||
66b47d2c AD |
39 | /*** |
40 | * Sets speed of intake wheel to input speed | |
41 | * | |
42 | * @param speed | |
43 | * from -1 to 1 | |
44 | */ | |
dab6e7d6 | 45 | public void setSpeed(double speed) { |
c9eb0d1c | 46 | intakeWheel.set(speed); |
dab6e7d6 AD |
47 | } |
48 | ||
0ceab9a4 | 49 | } |