Commit | Line | Data |
---|---|---|
7b11350e KZ |
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 | public class IntakeArm extends Subsystem { | |
7b11350e KZ |
9 | private CANTalon intake; |
10 | private CANTalon chevalDeFriseHand; | |
11 | ||
12 | public IntakeArm() { | |
13 | intake = new CANTalon(Constants.IntakeArm.PORT); | |
c4e71803 | 14 | chevalDeFriseHand = new CANTalon(Constants.IntakeArm.CHEVAL_DE_FRISE_HAND_PORT); |
7b11350e KZ |
15 | } |
16 | ||
17 | /* | |
18 | * Intake only moves once at the beginning of the match. It lowers at the | |
19 | * beginning of the match and is held there by mechanical stops until the end | |
20 | * of the match. | |
fdde5248 | 21 | * |
7b11350e KZ |
22 | * Must be used in a command that has a timer variable to stop it. |
23 | */ | |
24 | public void dropIntake() { | |
25 | intake.set(0.3); | |
26 | } | |
27 | ||
28 | public void intake() { | |
29 | intake.set(Constants.IntakeArm.INTAKE_SPEED); | |
30 | } | |
31 | ||
32 | public void output() { | |
33 | intake.set(Constants.IntakeArm.OUTPUT_SPEED); | |
34 | } | |
35 | ||
fdde5248 | 36 | /*** |
08d3b5a4 YA |
37 | * This method allows you to set the speed of the motor. The range of speed |
38 | * is from [-1, 1]. A negative speed changes the direction of the motors, | |
39 | * making it run backwards. | |
40 | * | |
fdde5248 YA |
41 | * @param speed |
42 | * The speed of the motors that control the rollers. The range of | |
43 | * these motors go from [-1,1]. A negative speed changes the | |
08d3b5a4 | 44 | * direction of the motors, making it run backwards. |
8e57685f KZ |
45 | * ======= |
46 | * public IntakeArm() { | |
47 | * | |
48 | * } | |
49 | * | |
50 | * /*** | |
51 | * This method allows you to set the speed of the motor(s). The range | |
52 | * of speed | |
53 | * is from [-1, 1]. A negative speed changes the direction of the | |
54 | * motors. | |
55 | * | |
56 | * @param speed | |
57 | * The speed of the motors that control the rollers. The range of | |
58 | * these motors go from [-1,1]. A negative speed changes the | |
59 | * direction of the motors. | |
60 | * >>>>>>> reset to unix format | |
fdde5248 YA |
61 | */ |
62 | ||
63 | public void setRollerSpeed(double speed) { | |
64 | ||
65 | } | |
66 | ||
67 | /*** | |
8e57685f | 68 | * <<<<<<< bd5dc4363add71a17f95409115dec96b83146549 |
08d3b5a4 YA |
69 | * This method gets you the current speed of the motor that controls the |
70 | * motor. The range of speed is from [-1,1]. A negative speed changes the | |
71 | * direction of the motor, making it run backwards. | |
fdde5248 | 72 | * |
08d3b5a4 YA |
73 | * @return Returns the speed of the motor that controls the roller. The range |
74 | * of the motor goes from [-1,1]. A negative speed changes the | |
75 | * direction of the motor, making it go backwards. | |
8e57685f KZ |
76 | * ======= |
77 | * | |
78 | * @return | |
79 | * >>>>>>> reset to unix format | |
fdde5248 YA |
80 | */ |
81 | ||
82 | public double getRollerSpeed() { | |
83 | return 0; | |
84 | } | |
85 | ||
86 | /*** | |
8e57685f | 87 | * <<<<<<< bd5dc4363add71a17f95409115dec96b83146549 |
08d3b5a4 YA |
88 | * This method checks to see if the motors controlling the rollers are |
89 | * currently working. | |
fdde5248 | 90 | * |
08d3b5a4 YA |
91 | * @return Returns whether the motors are currently running, and returns the |
92 | * state of the condition (true or false). | |
8e57685f KZ |
93 | * ======= |
94 | * | |
95 | * @return | |
96 | */ | |
97 | ||
98 | public boolean isBallInside() { | |
99 | return true; | |
100 | } | |
101 | ||
102 | /*** | |
103 | * | |
104 | * @return | |
105 | * >>>>>>> reset to unix format | |
fdde5248 YA |
106 | */ |
107 | ||
108 | public boolean areRollersRolling() { | |
109 | return true; | |
110 | } | |
111 | ||
7b11350e KZ |
112 | @Override |
113 | protected void initDefaultCommand() { | |
114 | ||
115 | } | |
116 | } |