change intake and output method names to intakeBall and outputBall
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / IntakeArm.java
CommitLineData
7b11350e
KZ
1package org.usfirst.frc.team3501.robot.subsystems;
2
3import org.usfirst.frc.team3501.robot.Constants;
4
6fd4f44e 5import edu.wpi.first.wpilibj.AnalogPotentiometer;
7b11350e
KZ
6import edu.wpi.first.wpilibj.CANTalon;
7import edu.wpi.first.wpilibj.command.Subsystem;
8
add57fee 9/***
1eb84222
SC
10 * The IntakeArm consists of two rollers that are controlled by one motor, with
11 * a potentiometer on it.
add57fee
YA
12 *
13 * The motor controls the rollers, making them roll forwards and backwards.
14 * The Intake rollers are on the back of the robot. As the rollers run, they
15 * intake the ball.
16 *
17 * @author superuser
18 *
19 */
20
7b11350e 21public class IntakeArm extends Subsystem {
28a012b6
SC
22 private CANTalon intakeRoller;
23 private CANTalon intakeArm;
6fd4f44e 24 private AnalogPotentiometer intakePot;
7b11350e
KZ
25
26 public IntakeArm() {
28a012b6
SC
27 intakeRoller = new CANTalon(Constants.IntakeArm.PORT);
28 intakeArm = new CANTalon(Constants.IntakeArm.CHEVAL_DE_FRISE_HAND_PORT);
7b11350e
KZ
29 }
30
31 /*
32 * Intake only moves once at the beginning of the match. It lowers at the
33 * beginning of the match and is held there by mechanical stops until the end
34 * of the match.
fdde5248 35 *
7b11350e
KZ
36 * Must be used in a command that has a timer variable to stop it.
37 */
7b11350e 38
4c82a9f5 39 public void intakeBall() {
28a012b6 40 intakeRoller.set(Constants.IntakeArm.INTAKE_SPEED);
7b11350e
KZ
41 }
42
4c82a9f5 43 public void outputBall() {
28a012b6 44 intakeRoller.set(Constants.IntakeArm.OUTPUT_SPEED);
7b11350e
KZ
45 }
46
fdde5248 47 /***
add57fee
YA
48 * This method allows you to set the voltage of the motor. The range of
49 * voltage is from [-1, 1]. A negative voltage makes the motor run backwards.
5e330e78 50 *
add57fee
YA
51 * @param voltage
52 * The voltage of the motors that control the rollers. The range of
53 * these motors go from [-1,1]. A negative voltage makes the motor
54 * run
55 * backwards.
fdde5248
YA
56 */
57
add57fee 58 public void setRollerVoltage(double voltage) {
fdde5248
YA
59
60 }
61
62 /***
5e330e78
SC
63 * This method gets you the current voltage of the motor that controls the
64 * intake arm. The range of voltage is from [-1,1].
65 * A negative voltage makes the motor run backwards.
add57fee
YA
66 *
67 * @return Returns the voltage of the motor that controls the roller. The
5e330e78
SC
68 * range of the voltage goes from [-1,1].
69 * A negative voltage indicates that the motor is running backwards.
fdde5248
YA
70 */
71
add57fee 72 public double getRollerVoltage() {
fdde5248
YA
73 return 0;
74 }
75
76 /***
92adc9db
SC
77 * This method checks to see if the presence of the ball inside is true or
78 * false.
fdde5248 79 *
92adc9db 80 * @return Returns whether the ball is inside as true or false
8e57685f
KZ
81 */
82
83 public boolean isBallInside() {
84 return true;
85 }
86
87 /***
f8856d62
SC
88 * This method checks to see if the motors controlling the rollers are
89 * currently running.
0e37d53e
YA
90 *
91 * @return Returns whether the motors are currently running, and returns the
92 * state of the condition (true or false).
1eb84222 93 *
fdde5248
YA
94 */
95
96 public boolean areRollersRolling() {
97 return true;
98 }
99
6fd4f44e
SC
100 /***
101 * This method gets the angle of the potentiometer on the Intake Arm.
4c82a9f5 102 *
6fd4f44e
SC
103 * @return angle of potentiometer
104 */
105 public double getIntakePot() {
106 return intakePot.get();
107 }
108
7b11350e
KZ
109 @Override
110 protected void initDefaultCommand() {
111
112 }
113}