projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code review changes
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
shooter
/
RunIndexWheel.java
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 d9966f1171494ace578ccc72ae081a5bbed46c10..6abb095b60a0a5ac74de61627244f479ae2248f6 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheel.java
@@
-39,7
+39,9
@@
public class RunIndexWheel extends Command {
@Override
protected void execute() {
double shooterSpeed = shooter.getShooterRPM();
@Override
protected void execute() {
double shooterSpeed = shooter.getShooterRPM();
- if (shooterSpeed > 0)
+ double targetShooterSpeed = shooter.getTargetShootingSpeed();
+ double threshold = shooter.getRPMThreshold();
+ if (Math.abs(shooterSpeed - targetShooterSpeed) <= threshold)
shooter.runIndexWheel();
}
shooter.runIndexWheel();
}