X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fclimber%2FRunWinchContinuous.java;h=06fa1547db2131986d6ea88af5fba47ca3c1387c;hp=210199d86e2cb3dc178fb5d289f0446e4147368f;hb=150f450f2b4f9e6094d71007507a7b877e05328a;hpb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb 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 210199d..06fa154 100644 --- 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; +import org.usfirst.frc.team3501.robot.OI; 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; @@ -18,7 +19,7 @@ import edu.wpi.first.wpilibj.command.Command; * */ public class RunWinchContinuous extends Command { - DriveTrain driveTrain = Robot.getDriveTrain(); + Climber climber = Robot.getClimber(); private double climbingSpeed; /** @@ -28,8 +29,8 @@ public class RunWinchContinuous extends Command { * value range is from -1 to 1 */ public RunWinchContinuous() { - requires(driveTrain); - climbingSpeed = driveTrain.CLIMBER_SPEED; + requires(climber); + climbingSpeed = climber.CLIMBER_SPEED; } @Override @@ -38,7 +39,8 @@ public class RunWinchContinuous extends Command { @Override protected void execute() { - Robot.getDriveTrain().setMotorValues(climbingSpeed, climbingSpeed); + double thrust = OI.leftJoystick.getY(); + climber.setMotorValues(-thrust); } @Override @@ -48,7 +50,7 @@ public class RunWinchContinuous extends Command { @Override protected void end() { - + climber.stop(); } @Override