From: Kevin Zhang Date: Sat, 30 Jan 2016 05:51:01 +0000 (-0800) Subject: reset to unix format X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=d6c9c0f450d10e1a25b0812458aa98d7110fdf57 reset to unix format --- diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java index f9c91d9b..38d0133b 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DefenseArm.java @@ -1,81 +1,81 @@ -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; - -public class DefenseArm extends Subsystem { - // Defense arm related objects - private AnalogPotentiometer defenseArmPotentiometer; - private AnalogPotentiometer defenseHandPotentiometer; - private CANTalon defenseArm; - private CANTalon defenseHand; - private double hookHeight; - private double footHeight; - - private double[] potAngles = { 0, 45, 90 }; - - // array; - - public DefenseArm() { - defenseArmPotentiometer = new AnalogPotentiometer( - Constants.DefenseArm.ARM_CHANNEL, - Constants.DefenseArm.FULL_RANGE, - Constants.DefenseArm.OFFSET); - - defenseArm = new CANTalon(Constants.DefenseArm.ARM_PORT); - defenseHand = new CANTalon(Constants.DefenseArm.HAND_PORT); - } - - public double getArmPotAngle() { - return defenseArmPotentiometer.get(); - } - - public double getHandPotAngle() { - return defenseHandPotentiometer.get(); - } - - /*** - * 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 setArmSpeed(double speed) { - if (speed > 1) - speed = 1; - else if (speed < -1) - speed = -1; - - defenseArm.set(speed); - } - - /*** - * 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 setHandSpeed(double speed) { - if (speed > 1) - speed = 1; - else if (speed < -1) - speed = -1; - - defenseHand.set(speed); - } - - @Override - protected void initDefaultCommand() { - } -} +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; + +public class DefenseArm extends Subsystem { + // Defense arm related objects + private AnalogPotentiometer defenseArmPotentiometer; + private AnalogPotentiometer defenseHandPotentiometer; + private CANTalon defenseArm; + private CANTalon defenseHand; + private double hookHeight; + private double footHeight; + + private double[] potAngles = { 0, 45, 90 }; + + // array; + + public DefenseArm() { + defenseArmPotentiometer = new AnalogPotentiometer( + Constants.DefenseArm.ARM_CHANNEL, + Constants.DefenseArm.FULL_RANGE, + Constants.DefenseArm.OFFSET); + + defenseArm = new CANTalon(Constants.DefenseArm.ARM_PORT); + defenseHand = new CANTalon(Constants.DefenseArm.HAND_PORT); + } + + public double getArmPotAngle() { + return defenseArmPotentiometer.get(); + } + + public double getHandPotAngle() { + return defenseHandPotentiometer.get(); + } + + /*** + * 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 setArmSpeed(double speed) { + if (speed > 1) + speed = 1; + else if (speed < -1) + speed = -1; + + defenseArm.set(speed); + } + + /*** + * 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 setHandSpeed(double speed) { + if (speed > 1) + speed = 1; + else if (speed < -1) + speed = -1; + + defenseHand.set(speed); + } + + @Override + protected void initDefaultCommand() { + } +} diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java b/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java index 18a2689f..630ad151 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/IntakeArm.java @@ -37,7 +37,7 @@ public class IntakeArm extends Subsystem { /*** * This method allows you to set the speed of the motor(s). The range of speed * is from [-1, 1]. A negative speed changes the direction of the motors. - * + * * @param speed * The speed of the motors that control the rollers. The range of * these motors go from [-1,1]. A negative speed changes the