X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fclimber%2FRunWinch.java;h=39149abb14fba12c4c77e24d5aaf2d694da20bf6;hb=refs%2Fheads%2Fmaster;hp=bed5c8ca0bda9efa108d8840a12a0d64432bb885;hpb=3e515b7546e96e26bb285ec36af3df24b3c7654e;p=3501%2F2017steamworks 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 bed5c8c..39149ab 100644 --- 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; +import org.usfirst.frc.team3501.robot.subsystems.Climber; -import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.command.Command; /** @@ -24,7 +24,8 @@ import edu.wpi.first.wpilibj.command.Command; */ public class RunWinch extends Command { - Timer timer; + Climber climber = Robot.getClimber(); + private double time; private double motorVal; @@ -36,35 +37,31 @@ public class RunWinch extends Command { * @param motorVal * value range is from -1 to 1 */ - public RunWinch(double time, double motorVal) { - requires(Robot.getDriveTrain()); + public RunWinch() { + requires(climber); this.time = time; this.motorVal = motorVal; } @Override protected void initialize() { - timer.start(); + climber.setCANTalonsBrakeMode(climber.COAST_MODE); } @Override protected void execute() { - Robot.getDriveTrain().setMotorValues(motorVal, motorVal); - + climber.setMotorValues(climber.CLIMBER_SPEED); } @Override protected boolean isFinished() { - return timer.get() >= time; + // return timeSinceInitialized() >= time; + return false; } @Override protected void end() { - Robot.getDriveTrain().stop(); -<<<<<<< 1b45bc927675060d057730fc7c7083fb9d813f66 -======= - ->>>>>>> Delete StopWinch and Climber subsystem, edit javadoc comments + climber.stop(); } @Override