X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fclimber%2FRunWinch.java;h=5a76b5c182b377c6892b64c75572ca0857fa44ec;hp=0e980a49e3b3bb02ed2db8a95d6f866d568f893f;hb=150f450f2b4f9e6094d71007507a7b877e05328a;hpb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb 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 0e980a4..5a76b5c 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java @@ -1,6 +1,7 @@ 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.command.Command; @@ -23,6 +24,8 @@ import edu.wpi.first.wpilibj.command.Command; */ public class RunWinch extends Command { + Climber climber = Robot.getClimber(); + private double time; private double motorVal; @@ -35,7 +38,7 @@ public class RunWinch extends Command { * value range is from -1 to 1 */ public RunWinch(double time, double motorVal) { - requires(Robot.getDriveTrain()); + requires(climber); this.time = time; this.motorVal = motorVal; } @@ -46,8 +49,7 @@ public class RunWinch extends Command { @Override protected void execute() { - Robot.getDriveTrain().setMotorValues(motorVal, motorVal); - + climber.setMotorValues(motorVal); } @Override @@ -57,7 +59,7 @@ public class RunWinch extends Command { @Override protected void end() { - Robot.getDriveTrain().stop(); + climber.stop(); } @Override