projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I wrote code for incrreasing and decreasing shooting speed and added necessary consta...
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
shooter
/
IncreaseShootingSpeed.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java
index aeb74ec036beb37fd1f89af51bb0ec93c98e0eef..85bd3bd39dbedf9af5418853babcdb49edf7a4b4 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java
@@
-1,5
+1,8
@@
package org.usfirst.frc.team3501.robot.commands.shooter;
package org.usfirst.frc.team3501.robot.commands.shooter;
+import org.usfirst.frc.team3501.robot.Robot;
+import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
@@
-10,35
+13,34
@@
import edu.wpi.first.wpilibj.command.Command;
* flywheel is run, it will run at the increased shooting speed
*/
public class IncreaseShootingSpeed extends Command {
* flywheel is run, it will run at the increased shooting speed
*/
public class IncreaseShootingSpeed extends Command {
+ private Shooter shooter = Robot.getShooter();
+
public IncreaseShootingSpeed() {
}
public IncreaseShootingSpeed() {
}
- // Called just before this Command runs the first time
@Override
protected void initialize() {
@Override
protected void initialize() {
+ shooter.CURRENT_SHOOTING_SPEED += shooter.SHOOTING_SPEED_INCREMENT;
}
}
- // Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
}
@Override
protected void execute() {
}
- // Called once after isFinished returns true
@Override
protected void end() {
}
@Override
protected void end() {
}
- // Called when another command which requires one or more of the same
- // subsystems is scheduled to run
@Override
protected void interrupted() {
@Override
protected void interrupted() {
+ end();
}
@Override
protected boolean isFinished() {
}
@Override
protected boolean isFinished() {
- // TODO Auto-generated method stub
- return
fals
e;
+
+ return
tru
e;
}
}
}
}