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
/
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..5a76b5c182b377c6892b64c75572ca0857fa44ec 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
@@
-1,8
+1,8
@@
package org.usfirst.frc.team3501.robot.commands.climber;
import org.usfirst.frc.team3501.robot.Robot;
package org.usfirst.frc.team3501.robot.commands.climber;
import org.usfirst.frc.team3501.robot.Robot;
+import org.usfirst.frc.team3501.robot.subsystems.Climber;
-import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
@@
-24,7
+24,8
@@
import edu.wpi.first.wpilibj.command.Command;
*/
public class RunWinch extends Command {
*/
public class RunWinch extends Command {
- Timer timer;
+ Climber climber = Robot.getClimber();
+
private double time;
private double motorVal;
private double time;
private double motorVal;
@@
-37,31
+38,28
@@
public class RunWinch extends Command {
* value range is from -1 to 1
*/
public RunWinch(double time, double motorVal) {
* value range is from -1 to 1
*/
public RunWinch(double time, double motorVal) {
- requires(Robot.getDriveTrain());
- timer = new Timer();
+ requires(climber);
this.time = time;
this.motorVal = motorVal;
}
@Override
protected void initialize() {
this.time = time;
this.motorVal = motorVal;
}
@Override
protected void initialize() {
- timer.start();
}
@Override
protected void execute() {
}
@Override
protected void execute() {
- Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
-
+ climber.setMotorValues(motorVal);
}
@Override
protected boolean isFinished() {
}
@Override
protected boolean isFinished() {
- return time
r.get
() >= time;
+ return time
SinceInitialized
() >= time;
}
@Override
protected void end() {
}
@Override
protected void end() {
-
Robot.getDriveTrain()
.stop();
+
climber
.stop();
}
@Override
}
@Override