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
/
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 210199d86e2cb3dc178fb5d289f0446e4147368f..0772ffb95ecbe7c12c153aca548c2c9a95a04b1f 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,7
+1,8
@@
package org.usfirst.frc.team3501.robot.commands.climber;
package org.usfirst.frc.team3501.robot.commands.climber;
+import org.usfirst.frc.team3501.robot.OI;
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.Robot;
-import org.usfirst.frc.team3501.robot.subsystems.
DriveTrain
;
+import org.usfirst.frc.team3501.robot.subsystems.
Climber
;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Command;
@@
-18,7
+19,7
@@
import edu.wpi.first.wpilibj.command.Command;
*
*/
public class RunWinchContinuous extends Command {
*
*/
public class RunWinchContinuous extends Command {
-
DriveTrain driveTrain = Robot.getDriveTrain
();
+
Climber climber = Robot.getClimber
();
private double climbingSpeed;
/**
private double climbingSpeed;
/**
@@
-28,17
+29,19
@@
public class RunWinchContinuous extends Command {
* value range is from -1 to 1
*/
public RunWinchContinuous() {
* value range is from -1 to 1
*/
public RunWinchContinuous() {
- requires(
driveTrain
);
- climbingSpeed =
driveTrain
.CLIMBER_SPEED;
+ requires(
climber
);
+ climbingSpeed =
climber
.CLIMBER_SPEED;
}
@Override
protected void initialize() {
}
@Override
protected void initialize() {
+ climber.setCANTalonsBrakeMode(climber.COAST_MODE);
}
@Override
protected void execute() {
}
@Override
protected void execute() {
- Robot.getDriveTrain().setMotorValues(climbingSpeed, climbingSpeed);
+ double thrust = OI.xboxController.getY();
+ climber.setMotorValues(-thrust);
}
@Override
}
@Override
@@
-48,7
+51,7
@@
public class RunWinchContinuous extends Command {
@Override
protected void end() {
@Override
protected void end() {
-
+ climber.stop();
}
@Override
}
@Override