X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fauton%2FPassRoughTerrain.java;h=632974a16be16d282caf00521491eb11cf7923c8;hb=0f3df681ca44dc9f5c77f61326e1d7b0143ca2b9;hp=acc493d23e27f2df07fcd2f2fea662bb63f89897;hpb=42d6d87c1c837746f0322576cbadcb8b12179b5d;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java old mode 100755 new mode 100644 index acc493d2..632974a1 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java @@ -1,10 +1,18 @@ package org.usfirst.frc.team3501.robot.commands.auton; +import org.usfirst.frc.team3501.robot.Constants; +import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance; +import org.usfirst.frc.team3501.robot.commands.driving.DriveForTime; + import edu.wpi.first.wpilibj.command.CommandGroup; /*** * This command will drive the robot through the rough terrain. * + * dependency on subsytems: drivetrain + * + * dependency on other commands: DriveForTime + * * pre-condition: robot is flush against the ramp of the outerworks in front of * the rough terrain * @@ -16,20 +24,17 @@ import edu.wpi.first.wpilibj.command.CommandGroup; */ public class PassRoughTerrain extends CommandGroup { - // TODO: test for the time - private final double BEG_TIME = 0; - private final double MID_TIME = 0; - private final double END_TIME = 0; - - private final double BEG_SPEED = 0; - private final double MID_SPEED = 0; - private final double END_SPEED = 0; - public PassRoughTerrain() { - addSequential(new DriveForTime(BEG_TIME, BEG_SPEED)); - addSequential(new DriveForTime(MID_TIME, MID_SPEED)); - addSequential(new DriveForTime(END_TIME, BEG_SPEED)); + if (Constants.Auton.IS_USING_TIME) { + addSequential(new DriveForTime(Constants.Auton.PASS_ROUGH_TERRAIN_TIME, + Constants.Auton.PASS_ROUGH_TERRAIN_SPEED)); + } + else { + addSequential(new DriveDistance( + Constants.Auton.PASS_ROUGH_TERRAIN_DIST, + Constants.DriveTrain.PASS_DEFENSE_TIMEOUT)); + } } }