projects
/
3501
/
stronghold-2016
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add comments for PassLowBar
[3501/stronghold-2016]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
auton
/
PassLowBar.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
index 8d42325e8e77901618e189b4cfe23ed28445d06d..c03ce143465c5b9a58ba08ece9f6cb3cfc556719 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
@@
-1,10
+1,14
@@
package org.usfirst.frc.team3501.robot.commands.auton;
package org.usfirst.frc.team3501.robot.commands.auton;
-import edu.wpi.first.wpilibj.command.Command;
+import edu.wpi.first.wpilibj.command.Command
Group
;
/***
* This command will drive the robot through the low bar.
*
/***
* This command will drive the robot through the low bar.
*
+ * 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
*
* pre-condition: robot is flush against the ramp of the outerworks in front of
* the low bar
*
@@
-13,30
+17,18
@@
import edu.wpi.first.wpilibj.command.Command;
* @author Meryem and Avi
*
*/
* @author Meryem and Avi
*
*/
-public class PassLowBar extends Command {
-
public PassLowBar()
{
+
public class PassLowBar extends CommandGroup
{
- }
+ private final double DISTANCE = 4.0;
+ private final double DEFAULT_SPEED = 0.5;
- @Override
- protected void initialize() {
- }
-
- @Override
- protected void execute() {
- }
-
- @Override
- protected boolean isFinished() {
- return false;
- }
-
- @Override
- protected void end() {
+ 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));
}
}
- @Override
- protected void interrupted() {
+ public PassLowBar(double speed) {
+ addSequential(new DriveForDistance(DISTANCE, speed));
}
}
}
}