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