From: Shaina Chen Date: Fri, 5 Feb 2016 03:53:26 +0000 (-0800) Subject: create intake potentiometer and create method getIntakePot X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=6fd4f44e98a3c541da8509c0337931aa2ae63366 create intake potentiometer and create method getIntakePot --- 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() {