add four method stubs
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / DefenseArm.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.AnalogPotentiometer;
6 import edu.wpi.first.wpilibj.CANTalon;
7 import edu.wpi.first.wpilibj.command.Subsystem;
8
9 public class DefenseArm extends Subsystem {
10 // Defense arm related objects
11 private AnalogPotentiometer defenseArmPotentiometer;
12 private AnalogPotentiometer defenseHandPotentiometer;
13 private CANTalon defenseArmMotor;
14 private CANTalon defenseHandMotor;
15 private double hookHeight;
16 private double footHeight;
17
18 // Defense arm specific constants that relate to the degrees per pulse value
19 // for the potentiometers
20 // private final static double PULSES_PER_ROTATION = 1; // in pulses
21 public final static double FULL_RANGE = 270.0; // in degrees
22 public final static double OFFSET = -135.0; // in degrees
23 public final static double[] armPotValue = { 0.0, 45.0, 90.0 }; // 3 level
24
25 // array;
26
27 // do we want to use a hashmap??
28 // angles at 0,45,90 (Potentiometer value readings)
29 // degrees
30
31 public DefenseArm() {
32 defenseArmPotentiometer = new AnalogPotentiometer(
33 Constants.DefenseArm.ARM_CHANNEL, FULL_RANGE, OFFSET);
34
35 defenseArmMotor = new CANTalon(Constants.DefenseArm.ARM_PORT);
36 defenseHandMotor = new CANTalon(Constants.DefenseArm.HAND_PORT);
37 }
38
39 /***
40 * This method gets the height of the hook from the
41 * ground. The hook is attached to the end of the hand, which is attached to
42 * the arm.
43 *
44 * @return hookHeight gets height of hook from ground. The hook is attached to
45 * the end of the hand, which is attached the arm. The height is in
46 * inches.
47 *
48 */
49
50 public double getHookHeight() {
51
52 return 0;
53 }
54
55 /***
56 * This method gets the height of the foot from the ground. The foot is
57 * attached to the end of the hand, which is attached to the arm.
58 *
59 * @return footHeight gets height of foot from ground. The foot is attached to
60 * the end of the hand, which is attached the arm. The height is in
61 * inches.
62 *
63 */
64
65 public double getFootHeight() {
66 return 0;
67 }
68
69 /***
70 * This method sets the voltage of the arm motor. The range is from [-1,1]. A
71 * negative voltage makes the direction of the motor go backwards.
72 *
73 * @param speed
74 * The voltage that you set the motor at. The range of the voltage of
75 * the arm motor is from [-1,1]. A
76 * negative voltage makes the direction of the motor go backwards.
77 */
78
79 public void setArmMotorSpeed(double speed) {
80
81 }
82
83 /***
84 * This method sets the voltage of the hand motor. The range is from [-1,1]. A
85 * negative voltage makes the direction of the motor go backwards.
86 *
87 * @param speed
88 * The voltage that you set the motor at. The range of the voltage of
89 * the hand motor is from [-1,1]. A
90 * negative voltage makes the direction of the motor go backwards.
91 */
92
93 public void setHandMotorSpeed(double speed) {
94 }
95
96 @Override
97 protected void initDefaultCommand() {
98 }
99 }