projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
competition fixes
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
shooter
/
ReverseIndexWheelContinuous.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheelContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheelContinuous.java
index 4cb18f9b28b8e57061b62c3758a5ef357a975591..6c6400efb4c9a8fc6dc093420e9820678ef02a93 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheelContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/ReverseIndexWheelContinuous.java
@@
-20,6
+20,9
@@
import edu.wpi.first.wpilibj.command.Command;
public class ReverseIndexWheelContinuous extends Command {
private Shooter shooter = Robot.getShooter();
public class ReverseIndexWheelContinuous extends Command {
private Shooter shooter = Robot.getShooter();
+ private double previousMotorValue = 0;
+ private double targetMotorValue = -shooter.DEFAULT_INDEXING_MOTOR_VALUE;
+
/**
* See JavaDoc comment in class for details
*
/**
* See JavaDoc comment in class for details
*
@@
-27,7
+30,6
@@
public class ReverseIndexWheelContinuous extends Command {
* value range from -1 to 1
*/
public ReverseIndexWheelContinuous() {
* value range from -1 to 1
*/
public ReverseIndexWheelContinuous() {
- requires(shooter);
}
// Called just before this Command runs the first time
}
// Called just before this Command runs the first time
@@
-38,7
+40,9
@@
public class ReverseIndexWheelContinuous 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.reverseIndexWheel();
+ double motorValue = (6 * previousMotorValue + targetMotorValue) / 7;
+ previousMotorValue = motorValue;
+ shooter.setIndexWheelMotorVal(motorValue);
}
// Called once after isFinished returns true
}
// Called once after isFinished returns true