From 68b22e838c57f3f2de58b045cc2d8d801eb760d8 Mon Sep 17 00:00:00 2001 From: Yamini Adusumelli Date: Thu, 28 Jan 2016 19:46:56 -0800 Subject: [PATCH] add four method stubs --- .../team3501/robot/subsystems/DefenseArm.java | 43 +++++++++++++++---- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java index 562fe63f..b54a02f2 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java @@ -8,12 +8,12 @@ import edu.wpi.first.wpilibj.command.Subsystem; public class DefenseArm extends Subsystem { // Defense arm related objects - public AnalogPotentiometer defenseArmPotentiometer; - public AnalogPotentiometer defenseHandPotentiometer; - public CANTalon defenseArmMotor; - public CANTalon defenseHandMotor; - public double hookHeight; - public double footHeight; + private AnalogPotentiometer defenseArmPotentiometer; + private AnalogPotentiometer defenseHandPotentiometer; + private CANTalon defenseArmMotor; + private CANTalon defenseHandMotor; + private double hookHeight; + private double footHeight; // Defense arm specific constants that relate to the degrees per pulse value // for the potentiometers @@ -37,7 +37,7 @@ public class DefenseArm extends Subsystem { } /*** - * <<<<<<< Updated upstream This method gets the height of the hook from the + * This method gets the height of the hook from the * ground. The hook is attached to the end of the hand, which is attached to * the arm. * @@ -49,7 +49,7 @@ public class DefenseArm extends Subsystem { public double getHookHeight() { - return hookHeight; + return 0; } /*** @@ -63,9 +63,34 @@ public class DefenseArm extends Subsystem { */ public double getFootHeight() { + return 0; + } + + /*** + * This method sets the voltage of the arm motor. The range is from [-1,1]. A + * negative voltage makes the direction of the motor go backwards. + * + * @param speed + * The voltage that you set the motor at. The range of the voltage of + * the arm motor is from [-1,1]. A + * negative voltage makes the direction of the motor go backwards. + */ + + public void setArmMotorSpeed(double speed) { - return footHeight; + } + + /*** + * This method sets the voltage of the hand motor. The range is from [-1,1]. A + * negative voltage makes the direction of the motor go backwards. + * + * @param speed + * The voltage that you set the motor at. The range of the voltage of + * the hand motor is from [-1,1]. A + * negative voltage makes the direction of the motor go backwards. + */ + public void setHandMotorSpeed(double speed) { } @Override -- 2.30.2