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
/
DecreaseShootingSpeed.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java
index 23ac1a82d3f0fcabeb53e8d9305f06ce89e4f4a0..3bd4efd7490e7462306cbe05fb75ebff63c15516 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.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,35
@@
import edu.wpi.first.wpilibj.command.Command;
* flywheel is run, it will run at the decreased shooting speed
*/
public class DecreaseShootingSpeed extends Command {
* flywheel is run, it will run at the decreased shooting speed
*/
public class DecreaseShootingSpeed extends Command {
+ private Shooter shooter = Robot.getShooter();
+
public DecreaseShootingSpeed() {
}
public DecreaseShootingSpeed() {
}
- // 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 false;
+ return true;
+
}
}
}
}