X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fintakearm%2FPushDownChevalDeFrise.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fintakearm%2FPushDownChevalDeFrise.java;h=0000000000000000000000000000000000000000;hp=9852a1c0cbc9c03fd1453a261d2483f6b413d72a;hb=027452180cc75fa58cd6305d9eb351ec64b2345f;hpb=5cff891038f613483040c7f1a2b5b554adcd3313 diff --git a/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java b/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java deleted file mode 100755 index 9852a1c0..00000000 --- a/src/org/usfirst/frc/team3501/robot/commands/intakearm/PushDownChevalDeFrise.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands.intakearm; - -import org.usfirst.frc.team3501.robot.Robot; -import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance; - -import edu.wpi.first.wpilibj.command.CommandGroup; - -/** - * This command group uses the intake arm to push down the moving parts of the - * cheval de frise so that the robot can drive over it - * - * pre-condition: the robot is flush against the border of the outerworks (flush - * against the ramp) - * - * post condition: intake arm has pushed the cheval de frise down - * - */ -public class PushDownChevalDeFrise extends CommandGroup { - // distances are in inches - 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 = Robot.intakeArm.potAngles[0]; - private final double DEFAULT_ARM_SPEED = 0.4; - - public PushDownChevalDeFrise() { - requires(Robot.intakeArm); - /** - * if the arm is high enough - above cheval de frise height (find this from - * the potangle) - * - * go forward until arm is over cheval de frise - * - * move arm down to floor level -- or as much as possible - * ------------------------------------------------------------------------- - * - * if the arm is beneath the cheval de frise - * - * move the arm up so it's high enough - * - * move forward a little - * - * move arm down - **/ - - if (Robot.intakeArm.getArmAngle() > MIN_ANGLE) { - addSequential(new DriveDistance(RAMP_DIST, MAX_TIMEOUT_RAMP)); - addSequential(new MoveIntakeArmToAngle(LOWEST_ANGLE, DEFAULT_ARM_SPEED)); - - } else { - addSequential(new MoveIntakeArmToAngle(MIN_ANGLE + 3, DEFAULT_ARM_SPEED)); // TODO: - // check that adding - // 3 is correct - - addSequential(new DriveDistance(RAMP_DIST, MAX_TIMEOUT_RAMP)); - addSequential(new MoveIntakeArmToAngle(LOWEST_ANGLE, DEFAULT_ARM_SPEED)); - - } - - } -}