From 7952bc91fc54a06c701b407db4f67dfef0452707 Mon Sep 17 00:00:00 2001 From: Meryem Esa Date: Tue, 16 Feb 2016 12:58:11 -0800 Subject: [PATCH] change angle contstants to use potValues array --- .../commands/intakearm/PushDownChevalDeFrise.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java b/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java index f877cc64..9852a1c0 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java +++ b/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java @@ -17,12 +17,15 @@ import edu.wpi.first.wpilibj.command.CommandGroup; */ public class PushDownChevalDeFrise extends CommandGroup { // distances are in inches - private final double MIN_ANGLE = 0; // TODO: find min angle the intake arm has - // to be to be over the cheval de frise + private final double MIN_ANGLE = Robot.intakeArm.potAngles[2]; // TODO: find + // min angle + // the intake + // arm has + // to be to be over the cheval de frise private final double RAMP_DIST = 12; private final double MAX_TIMEOUT_RAMP = 1; // TODO: check that one second is // enough - private final double LOWEST_ANGLE = 0; // TODO: find angle + private final double LOWEST_ANGLE = Robot.intakeArm.potAngles[0]; private final double DEFAULT_ARM_SPEED = 0.4; public PushDownChevalDeFrise() { @@ -43,7 +46,7 @@ public class PushDownChevalDeFrise extends CommandGroup { * move forward a little * * move arm down - */ + **/ if (Robot.intakeArm.getArmAngle() > MIN_ANGLE) { addSequential(new DriveDistance(RAMP_DIST, MAX_TIMEOUT_RAMP)); -- 2.30.2