From 6fd4f44e98a3c541da8509c0337931aa2ae63366 Mon Sep 17 00:00:00 2001 From: Shaina Chen Date: Thu, 4 Feb 2016 19:53:26 -0800 Subject: [PATCH] create intake potentiometer and create method getIntakePot --- .../frc/team3501/robot/subsystems/IntakeArm.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java b/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java index e66fe08e..bee2af14 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java @@ -2,6 +2,7 @@ package org.usfirst.frc.team3501.robot.subsystems; import org.usfirst.frc.team3501.robot.Constants; +import edu.wpi.first.wpilibj.AnalogPotentiometer; import edu.wpi.first.wpilibj.CANTalon; import edu.wpi.first.wpilibj.command.Subsystem; @@ -20,6 +21,7 @@ import edu.wpi.first.wpilibj.command.Subsystem; public class IntakeArm extends Subsystem { private CANTalon intakeRoller; private CANTalon intakeArm; + private AnalogPotentiometer intakePot; public IntakeArm() { intakeRoller = new CANTalon(Constants.IntakeArm.PORT); @@ -98,6 +100,15 @@ public class IntakeArm extends Subsystem { return true; } + /*** + * This method gets the angle of the potentiometer on the Intake Arm. + * + * @return angle of potentiometer + */ + public double getIntakePot() { + return intakePot.get(); + } + @Override protected void initDefaultCommand() { -- 2.30.2