From: Shivani Ghanta Date: Wed, 18 Jan 2017 02:52:15 +0000 (-0800) Subject: Edit comments X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=de8c65d38fd643da973fd225808614b13fca9f45 Edit comments --- diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index f905730..e72c028 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -1,6 +1,8 @@ package org.usfirst.frc.team3501.robot; import edu.wpi.first.wpilibj.Joystick; +import edu.wpi.first.wpilibj.buttons.Button; +import edu.wpi.first.wpilibj.buttons.JoystickButton; public class OI { private static OI oi; @@ -11,7 +13,8 @@ public class OI { public OI() { leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); -  toggleWinch = new JoystickButton(leftJoystick,Constants.OI.TOGGLE_WINCH_PORT); + toggleWinch = new JoystickButton(leftJoystick, + Constants.OI.TOGGLE_WINCH_PORT); } 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 ba8b201..d6d047c 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java @@ -7,8 +7,12 @@ import com.sun.glass.ui.Timer; import edu.wpi.first.wpilibj.command.Command; /** - * Runs the winch for a given time and motor value + * This command runs the winch for a given motor value and time in seconds * + * @param motorVal + * value range is from -1 to 1 + * @param time + * in seconds * @author shivanighanta * */ 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 dc29866..c15ca10 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java @@ -5,7 +5,8 @@ import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; /** - * Runs the winch continuously at a given motor value + * This command will run the winch motor continuously until the button + * triggering it is released * * @author shivanighanta * @@ -30,7 +31,7 @@ public class RunWinchContinuous extends Command { @Override protected boolean isFinished() { - return false; + return !Robot.getOI().toggleWinch.get(); } @Override diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java index 3426dad..9dd7361 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java @@ -15,10 +15,10 @@ public class Climber { } public void stop() { - setMotorValues(0); + setMotorValue(0); } - public void setMotorValues(final double val) { + public void setMotorValue(final double val) { } }