From 90cf1657f15a9f66ce79dacf898ad2b9b453ae16 Mon Sep 17 00:00:00 2001 From: niyatisriram Date: Wed, 17 Feb 2016 11:32:49 -0800 Subject: [PATCH] Make 2 new classes, ExtendPunch and RetractPunch in the place of Punch --- .../robot/commands/shooter/ExtendPunch.java | 34 +++++++++++++++++++ .../shooter/{Punch.java => RetractPunch.java} | 6 ++-- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java rename src/org/usfirst/frc/team3501/robot/commands/shooter/{Punch.java => RetractPunch.java} (86%) diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java new file mode 100644 index 00000000..a3cb8138 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/ExtendPunch.java @@ -0,0 +1,34 @@ +package org.usfirst.frc.team3501.robot.commands.shooter; + +import org.usfirst.frc.team3501.robot.Robot; + +import edu.wpi.first.wpilibj.command.Command; + +public class ExtendPunch extends Command { + + @Override + protected void initialize() { + Robot.shooter.extendPunch(); + } + + @Override + protected void execute() { + + } + + @Override + protected boolean isFinished() { + return true; + } + + @Override + protected void end() { + + } + + @Override + protected void interrupted() { + + } + +} diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/Punch.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RetractPunch.java similarity index 86% rename from src/org/usfirst/frc/team3501/robot/commands/shooter/Punch.java rename to src/org/usfirst/frc/team3501/robot/commands/shooter/RetractPunch.java index 36ef785f..c977a2e8 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/Punch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RetractPunch.java @@ -4,11 +4,11 @@ import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; -public class Punch extends Command { +public class RetractPunch extends Command { @Override protected void initialize() { - Robot.shooter.extendPunch(); + Robot.shooter.retractPunch(); } @Override @@ -23,7 +23,7 @@ public class Punch extends Command { @Override protected void end() { - Robot.shooter.retractPunch(); + } @Override -- 2.30.2