Add set motor speed methods in defense arm and add potentiometer getter methods
[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
5import edu.wpi.first.wpilibj.CANTalon;
6import edu.wpi.first.wpilibj.command.Subsystem;
7
8public class IntakeArm extends Subsystem {
9
10 private CANTalon intake;
11 private CANTalon chevalDeFriseHand;
12
13 public IntakeArm() {
14 intake = new CANTalon(Constants.IntakeArm.PORT);
c4e71803 15 chevalDeFriseHand = new CANTalon(Constants.IntakeArm.CHEVAL_DE_FRISE_HAND_PORT);
7b11350e
KZ
16 }
17
18 /*
19 * Intake only moves once at the beginning of the match. It lowers at the
20 * beginning of the match and is held there by mechanical stops until the end
21 * of the match.
fdde5248 22 *
7b11350e
KZ
23 * Must be used in a command that has a timer variable to stop it.
24 */
25 public void dropIntake() {
26 intake.set(0.3);
27 }
28
29 public void intake() {
30 intake.set(Constants.IntakeArm.INTAKE_SPEED);
31 }
32
33 public void output() {
34 intake.set(Constants.IntakeArm.OUTPUT_SPEED);
35 }
36
fdde5248 37 /***
08d3b5a4
YA
38 * This method allows you to set the speed of the motor. The range of speed
39 * is from [-1, 1]. A negative speed changes the direction of the motors,
40 * making it run backwards.
41 *
fdde5248
YA
42 * @param speed
43 * The speed of the motors that control the rollers. The range of
44 * these motors go from [-1,1]. A negative speed changes the
08d3b5a4 45 * direction of the motors, making it run backwards.
fdde5248
YA
46 */
47
48 public void setRollerSpeed(double speed) {
49
50 }
51
52 /***
08d3b5a4
YA
53 * This method gets you the current speed of the motor that controls the
54 * motor. The range of speed is from [-1,1]. A negative speed changes the
55 * direction of the motor, making it run backwards.
fdde5248 56 *
08d3b5a4
YA
57 * @return Returns the speed of the motor that controls the roller. The range
58 * of the motor goes from [-1,1]. A negative speed changes the
59 * direction of the motor, making it go backwards.
fdde5248
YA
60 */
61
62 public double getRollerSpeed() {
63 return 0;
64 }
65
66 /***
08d3b5a4
YA
67 * This method checks to see if the motors controlling the rollers are
68 * currently working.
fdde5248 69 *
08d3b5a4
YA
70 * @return Returns whether the motors are currently running, and returns the
71 * state of the condition (true or false).
fdde5248
YA
72 */
73
74 public boolean areRollersRolling() {
75 return true;
76 }
77
7b11350e
KZ
78 @Override
79 protected void initDefaultCommand() {
80
81 }
82}