From: Shivani Ghanta Date: Wed, 18 Jan 2017 03:10:14 +0000 (-0800) Subject: Add pre-conditions and post-conditions to comments X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=e2e9a7a7c86cb8b19704096ed9fd8929f70420fc Add pre-conditions and post-conditions to comments --- 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 d6d047c..54df317 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java @@ -7,7 +7,13 @@ import com.sun.glass.ui.Timer; import edu.wpi.first.wpilibj.command.Command; /** - * This command runs the winch for a given motor value and time in seconds + * This command runs the winch at a specified speed and time in seconds when the + * button triggering it is pressed. + * + * pre-condition: This command is run by a button in OI. The robot must be + * attached to the rope. + * + * post-condition: Winch motor set to a specified speed for a specified time. * * @param motorVal * value range is from -1 to 1 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 c15ca10..bb2a74e 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java @@ -6,7 +6,15 @@ import edu.wpi.first.wpilibj.command.Command; /** * This command will run the winch motor continuously until the button - * triggering it is released + * triggering it is released. + * + * pre-condition: This command must be run by a button in OI. The robot must be + * attached to the rope. + * + * post-condition: Winch motor set to a specified speed. + * + * @param motorVal + * value range is from -1 to 1 * * @author shivanighanta * diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java index 8fa01a3..903f22b 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java @@ -5,7 +5,9 @@ import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; /** - * Stops the winch + * This command stops the winch + * + * post-condition: the motor values are set to 0. * * @author shivanighanta *