projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a4e4ff
)
Only run indexwheel if flywheel is running
author
Nadia Anees
<n.anees655@gmail.com>
Sat, 11 Feb 2017 03:28:40 +0000
(19:28 -0800)
committer
Cindy Zhang
<cindyzyx9@gmail.com>
Sun, 19 Feb 2017 21:33:56 +0000
(13:33 -0800)
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
index 68383544bf95779ff7b7b79f887703b9a8942a83..3f8baa0c3ffe2527e59701e9967115371685f979 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
@@
-38,7
+38,10
@@
public class RunIndexWheel extends Command {
// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
- shooter.setIndexWheelMotorVal(shooter.DEFAULT_INDEXING_SPEED);
+ double shooterSpeed = shooter.getShooterRPM();
+ if (shooterSpeed > 0) {
+ shooter.setIndexWheelMotorVal(shooter.DEFAULT_INDEXING_SPEED);
+ }
}
// Called once after isFinished returns true
}
// Called once after isFinished returns true
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
index cb56bf42f4e2b1b53cbbaf35a0e3c15bd8c29293..f958be7fa4788e067e93b225680d56045e08c532 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
@@
-38,7
+38,10
@@
public class RunIndexWheelContinuous extends Command {
// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
- shooter.setIndexWheelMotorVal(shooter.DEFAULT_INDEXING_SPEED);
+ double shooterSpeed = shooter.getShooterRPM();
+ if (shooterSpeed > 0) {
+ shooter.setIndexWheelMotorVal(shooter.DEFAULT_INDEXING_SPEED);
+ }
}
// Called once after isFinished returns true
}
// Called once after isFinished returns true