projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finish implementing MaintainClimbedPosition
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
climber
/
RunWinch.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
index 2428aff2345244364035e842c40042626d27c74d..7858384dac649f30555d40761e6fa52b6e09ebd5 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
@@
-2,7
+2,6
@@
package org.usfirst.frc.team3501.robot.commands.climber;
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.Robot;
-import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
@@
-24,7
+23,6
@@
import edu.wpi.first.wpilibj.command.Command;
*/
public class RunWinch extends Command {
*/
public class RunWinch extends Command {
- Timer timer;
private double time;
private double motorVal;
private double time;
private double motorVal;
@@
-34,18
+32,16
@@
public class RunWinch extends Command {
* @param time
* time in seconds to run the winch
* @param motorVal
* @param time
* time in seconds to run the winch
* @param motorVal
- * value range is from -1 to 1
+ * value range is fro
s
m -1 to 1
*/
public RunWinch(double time, double motorVal) {
requires(Robot.getDriveTrain());
*/
public RunWinch(double time, double motorVal) {
requires(Robot.getDriveTrain());
- timer = new Timer();
this.time = time;
this.motorVal = motorVal;
}
@Override
protected void initialize() {
this.time = time;
this.motorVal = motorVal;
}
@Override
protected void initialize() {
- timer.start();
}
@Override
}
@Override
@@
-56,7
+52,7
@@
public class RunWinch extends Command {
@Override
protected boolean isFinished() {
@Override
protected boolean isFinished() {
- return time
r.get
() >= time;
+ return time
SinceInitialized
() >= time;
}
@Override
}
@Override