From e2e9a7a7c86cb8b19704096ed9fd8929f70420fc Mon Sep 17 00:00:00 2001 From: Shivani Ghanta Date: Tue, 17 Jan 2017 19:10:14 -0800 Subject: [PATCH] Add pre-conditions and post-conditions to comments --- .../frc/team3501/robot/commands/climber/RunWinch.java | 8 +++++++- .../robot/commands/climber/RunWinchContinuous.java | 10 +++++++++- .../frc/team3501/robot/commands/climber/StopWinch.java | 4 +++- 3 files changed, 19 insertions(+), 3 deletions(-) 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 * -- 2.30.2