add second defenseArmMotor related constants
[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 public AnalogPotentiometer defenseArmPotentiometer;
12 public AnalogPotentiometer defenseHandPotentiometer;
13 public CANTalon defenseArmMotor;
14 public CANTalon defenseHandMotor;
15
16 // Defense arm specific constants that relate to the degrees per pulse value
17 // for the potentiometers
18 // private final static double PULSES_PER_ROTATION = 1; // in pulses
19 public final static double FULL_RANGE = 270.0; // in degrees
20 public final static double OFFSET = -135.0; // in degrees
21 public final static double[] armPotValue = { 0.0, 45.0, 90.0 }; // 3 level
22 // array;
23
24 // do we want to use a hashmap??
25 // angles at 0,45,90 (Potentiometer value readings)
26 // degrees
27
28 public DefenseArm() {
29 defenseArmPotentiometer = new AnalogPotentiometer(
30 Constants.DefenseArm.ARM_CHANNEL,
31 FULL_RANGE, OFFSET);
32 defenseHandPotentiometer = new AnalogPotentiometer(
33 Constants.DefenseArm.HAND_CHANNEL);
34 defenseArmMotor = new CANTalon(Constants.DefenseArm.ARM_PORT);
35 defenseHandMotor = new CANTalon(Constants.DefenseArm.HAND_PORT);
36 }
37
38 @Override
39 protected void initDefaultCommand() {
40 }
41 }