projects
/
3501
/
stronghold-2016
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0496ee1
)
use wait command and move if statements from shoot at high goal to resetcatapult
author
Meryem Esa
<meresa14@gmail.com>
Wed, 16 Mar 2016 01:49:37 +0000
(18:49 -0700)
committer
Harel Dor
<hareldor@gmail.com>
Tue, 22 Mar 2016 23:02:00 +0000
(16:02 -0700)
src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java
index 3c46bf4dfcf757e1e651bdf7a665d49822e6a458..0651ce8f1b04582c7255b052c854d8cc4231a501 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/ResetCatapult.java
@@
-5,6
+5,11
@@
import org.usfirst.frc.team3501.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Command;
+/***
+ *
+ * This command will retract the catapult pistons.
+ *
+ */
public class ResetCatapult extends Command {
public ResetCatapult() {
public class ResetCatapult extends Command {
public ResetCatapult() {
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java
index 70817273d28a4fedf5bd3c17312b364a007a06ee..6d15cde8362194c3ca7ef19763a6a3f49929a827 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/ShootAtHighGoal.java
@@
-14,6
+14,7
@@
import edu.wpi.first.wpilibj.command.WaitCommand;
* post-conditions: catapult is retracted, intake is extended
*/
public class ShootAtHighGoal extends CommandGroup {
* post-conditions: catapult is retracted, intake is extended
*/
public class ShootAtHighGoal extends CommandGroup {
+ private static final double WAIT_SECONDS = 0.4;
public ShootAtHighGoal() {
// make sure catapult is down
public ShootAtHighGoal() {
// make sure catapult is down
@@
-29,7
+30,7
@@
public class ShootAtHighGoal extends CommandGroup {
addSequential(new MoveIntakeArm(IntakeArm.EXTEND));
// wait a bit
addSequential(new MoveIntakeArm(IntakeArm.EXTEND));
// wait a bit
- addSequential(new WaitCommand(
1.0
));
+ addSequential(new WaitCommand(
WAIT_SECONDS
));
// retract catapult pistons
addSequential(new ResetCatapult());
// retract catapult pistons
addSequential(new ResetCatapult());
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
index c3500e2ba27b644e309823556e7a45cfbdbddd1b..ef24614ddfc083b61357be289ee605a362d930f9 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
@@
-34,6
+34,7
@@
public class Shooter extends Subsystem {
catapult2.set(Constants.Shooter.SHOOT);
}
catapult2.set(Constants.Shooter.SHOOT);
}
+ // Retracts catapult pistons
public void resetCatapult() {
catapult1.set(Constants.Shooter.RESET);
catapult2.set(Constants.Shooter.RESET);
public void resetCatapult() {
catapult1.set(Constants.Shooter.RESET);
catapult2.set(Constants.Shooter.RESET);