From: Shivani Ghanta Date: Sat, 14 Jan 2017 22:06:46 +0000 (-0800) Subject: Add commands for Climber and Climber subsystem X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=9738295a69eb289e0c590b236bab1843ad5e5a4c Add commands for Climber and Climber subsystem --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java new file mode 100644 index 0000000..0586c36 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java @@ -0,0 +1,42 @@ +package org.usfirst.frc.team3501.robot.commands.climber; + +import edu.wpi.first.wpilibj.command.Command; + +/** + * Runs the winch at a given time and motor value + * + * @author shivanighanta + * + */ +public class RunWinch extends Command { + private double time; + private double motorVal; + + public RunWinch(double time, double motorVal) { + this.time = time; + this.motorVal = motorVal; + } + + @Override + protected void initialize() { + } + + @Override + protected void execute() { + + } + + @Override + protected boolean isFinished() { + return false; + } + + @Override + protected void end() { + + } + + @Override + protected void interrupted() { + } +} diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java new file mode 100644 index 0000000..ee075f2 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java @@ -0,0 +1,40 @@ +package org.usfirst.frc.team3501.robot.commands.climber; + +import edu.wpi.first.wpilibj.command.Command; + +/** + * Runs the winch continuously at a given motor value + * + * @author shivanighanta + * + */ +public class RunWinchContinuous extends Command { + private double motorVal; + + public RunWinchContinuous(double motorVal) { + this.motorVal = motorVal; + } + + @Override + protected void initialize() { + } + + @Override + protected void execute() { + + } + + @Override + protected boolean isFinished() { + return false; + } + + @Override + protected void end() { + + } + + @Override + protected void interrupted() { + } +} diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java new file mode 100644 index 0000000..f024569 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java @@ -0,0 +1,38 @@ +package org.usfirst.frc.team3501.robot.commands.climber; + +import edu.wpi.first.wpilibj.command.Command; + +/** + * Stops the winch + * + * @author shivanighanta + * + */ +public class StopWinch extends Command { + + public StopWinch() { + } + + @Override + protected void initialize() { + } + + @Override + protected void execute() { + + } + + @Override + protected boolean isFinished() { + return false; + } + + @Override + protected void end() { + + } + + @Override + protected void interrupted() { + } +} diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java new file mode 100644 index 0000000..f68c679 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java @@ -0,0 +1,16 @@ +package org.usfirst.frc.team3501.robot.subsystems; + +public class Climber { + private static Climber climber; + + private Climber() { + + } + + public static Climber getClimber() { + if (climber == null) { + climber = climber(); + } + return climber; + } +}