X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fauton%2FPassLowBar.java;h=9ee3e6eeaff831dfadd8f25d2a639f528930e3cf;hb=ca325a5866b4f601b171b02ac767393bd996d44a;hp=c03ce143465c5b9a58ba08ece9f6cb3cfc556719;hpb=dcc47c448a6f2643206a84ff89eedea360ae0d66;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java b/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java old mode 100755 new mode 100644 index c03ce143..9ee3e6ee --- a/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java @@ -1,5 +1,9 @@ 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; /*** @@ -8,7 +12,7 @@ import edu.wpi.first.wpilibj.command.CommandGroup; * dependency on sensors: encoders * dependency on subsystems: drivetrain * dependency on other commands: DriveForDist - * + * * pre-condition: robot is flush against the ramp of the outerworks in front of * the low bar * @@ -20,15 +24,15 @@ import edu.wpi.first.wpilibj.command.CommandGroup; public class PassLowBar extends CommandGroup { - private final double DISTANCE = 4.0; - private final double DEFAULT_SPEED = 0.5; - public PassLowBar() { - // TODO: need to add sequential for retracting the arms and shooting hood once those commands are made - addSequential(new DriveForDistance(DISTANCE, DEFAULT_SPEED)); - } - - public PassLowBar(double speed) { - addSequential(new DriveForDistance(DISTANCE, speed)); + if (Constants.Auton.isUsingTime) { + addSequential(new DriveForTime(Constants.Auton.passLowBarTime, + Constants.Auton.passLowBarSpeed)); + } + else { + addSequential(new DriveDistance( + Constants.Auton.passLowBarDistance, + Constants.DriveTrain.PASS_DEFENSE_TIMEOUT)); + } } }