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