1 package org
.usfirst
.frc
.team3501
.robot
.subsystems
;
3 import org
.usfirst
.frc
.team3501
.robot
.Constants
;
5 import edu
.wpi
.first
.wpilibj
.AnalogPotentiometer
;
6 import edu
.wpi
.first
.wpilibj
.command
.Subsystem
;
8 public class DefenseArm
extends Subsystem
{
9 // Defense arm related objects
10 private AnalogPotentiometer potentiometer
;
12 // Defense arm specific constants that relate to the degrees per pulse value
13 // for the potentiometers
14 private final static double PULSES_PER_ROTATION
= 1; // in pulses
15 private final static double FULL_RANGE
= 270.0; // in degrees
16 private final static double OFFSET
= -135.0; // in degrees
17 private Double
[] potentiometerArray
; // change name, 5 to another #
20 potentiometer
= new AnalogPotentiometer(Constants
.DefenseArm
.CHANNEL
,
24 public double getDistance(int desiredArmLocation
) {
25 return potentiometerArray
[desiredArmLocation
];
28 public Double
[] putInValues() {
29 for (int i
= 0; i
< 3; i
++) {
30 potentiometerArray
[i
] = (double) (45 * i
);
32 return potentiometerArray
;
35 public void moveArmTo() {
40 protected void initDefaultCommand() {