projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implement ToggleWinch command
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
commands
/
climber
/
RunWinchContinuous.java
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
index 65277997b70fd20ccad3d85fbe60b2b5a8eb23c1..210199d86e2cb3dc178fb5d289f0446e4147368f 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
@@
-1,6
+1,7
@@
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.DriveTrain;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Command;
@@
-17,6
+18,8
@@
import edu.wpi.first.wpilibj.command.Command;
*
*/
public class RunWinchContinuous extends Command {
*
*/
public class RunWinchContinuous extends Command {
+ DriveTrain driveTrain = Robot.getDriveTrain();
+ private double climbingSpeed;
/**
* See JavaDoc comment in class for details
/**
* See JavaDoc comment in class for details
@@
-25,19
+28,17
@@
public class RunWinchContinuous extends Command {
* value range is from -1 to 1
*/
public RunWinchContinuous() {
* value range is from -1 to 1
*/
public RunWinchContinuous() {
- requires(Robot.getDriveTrain());
+ requires(driveTrain);
+ climbingSpeed = driveTrain.CLIMBER_SPEED;
}
@Override
protected void initialize() {
}
@Override
protected void initialize() {
- Robot.getDriveTrain().setMotorValues(
- Robot.getDriveTrain().getClimbingSpeed(),
- Robot.getDriveTrain().getClimbingSpeed());
}
@Override
protected void execute() {
}
@Override
protected void execute() {
-
+ Robot.getDriveTrain().setMotorValues(climbingSpeed, climbingSpeed);
}
@Override
}
@Override