From: Logan Howard Date: Sat, 18 Apr 2015 04:49:06 +0000 (-0700) Subject: change location of base files X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F3501-spark-go;a=commitdiff_plain;h=5b3b1652e197b540e14b8f5b405314b6f33d733c change location of base files --- diff --git a/src/org/usfirst/frc/team3501/bases/Command.java b/src/org/usfirst/frc/team3501/bases/Command.java new file mode 100644 index 0000000..b25eb39 --- /dev/null +++ b/src/org/usfirst/frc/team3501/bases/Command.java @@ -0,0 +1,24 @@ +package org.usfirst.frc.team3501.bases; + +import edu.wpi.first.wpilibj.command.Scheduler; + +public abstract class Command + extends edu.wpi.first.wpilibj.command.Command + implements CommandBase { + + public Command(String commandName) { + super(commandName); + } + + protected void schedule(Command c) { + Scheduler.getInstance().add(c); + } + + protected void initialize() {} + + protected void execute() {} + + protected void end() {} + + protected void interrupted() {} +} diff --git a/src/org/usfirst/frc/team3501/bases/CommandBase.java b/src/org/usfirst/frc/team3501/bases/CommandBase.java new file mode 100644 index 0000000..d797ce6 --- /dev/null +++ b/src/org/usfirst/frc/team3501/bases/CommandBase.java @@ -0,0 +1,19 @@ +package org.usfirst.frc.team3501.bases; + +import org.usfirst.frc.team3501.robot.AutonData; +import org.usfirst.frc.team3501.robot.OI; +import org.usfirst.frc.team3501.robot.Robot; +import org.usfirst.frc.team3501.robot.subsystems.*; + +public interface CommandBase { + + final static OI oi = Robot.oi; + + final static AutonData autonData = Robot.autonData; + + final static Drivetrain drivetrain = Robot.drivetrain; + final static Arm arm = Robot.arm; + final static Claw claw = Robot.claw; + + final static Pneumatics pneumatics = Robot.pneumatics; +} diff --git a/src/org/usfirst/frc/team3501/bases/CommandGroup.java b/src/org/usfirst/frc/team3501/bases/CommandGroup.java new file mode 100644 index 0000000..b1d5c31 --- /dev/null +++ b/src/org/usfirst/frc/team3501/bases/CommandGroup.java @@ -0,0 +1,10 @@ +package org.usfirst.frc.team3501.bases; + +public abstract class CommandGroup + extends edu.wpi.first.wpilibj.command.CommandGroup + implements CommandBase { + + public CommandGroup(String commandGroupName) { + super(commandGroupName); + } +} diff --git a/src/org/usfirst/frc/team3501/robot/autons/DriveOverStep.java b/src/org/usfirst/frc/team3501/robot/autons/DriveOverStep.java index 224bc9c..aa3e752 100644 --- a/src/org/usfirst/frc/team3501/robot/autons/DriveOverStep.java +++ b/src/org/usfirst/frc/team3501/robot/autons/DriveOverStep.java @@ -1,6 +1,6 @@ package org.usfirst.frc.team3501.robot.autons; -import org.usfirst.frc.team3501.robot.commands.Command; +import org.usfirst.frc.team3501.bases.Command; public class DriveOverStep extends Command { diff --git a/src/org/usfirst/frc/team3501/robot/autons/DrivePastStep.java b/src/org/usfirst/frc/team3501/robot/autons/DrivePastStep.java index f459750..fe4e2c3 100644 --- a/src/org/usfirst/frc/team3501/robot/autons/DrivePastStep.java +++ b/src/org/usfirst/frc/team3501/robot/autons/DrivePastStep.java @@ -1,6 +1,6 @@ package org.usfirst.frc.team3501.robot.autons; -import org.usfirst.frc.team3501.robot.commands.Command; +import org.usfirst.frc.team3501.bases.Command; public class DrivePastStep extends Command { diff --git a/src/org/usfirst/frc/team3501/robot/autons/PickUpContainer.java b/src/org/usfirst/frc/team3501/robot/autons/PickUpContainer.java index 52fb2b4..3f4b4aa 100644 --- a/src/org/usfirst/frc/team3501/robot/autons/PickUpContainer.java +++ b/src/org/usfirst/frc/team3501/robot/autons/PickUpContainer.java @@ -1,5 +1,6 @@ package org.usfirst.frc.team3501.robot.autons; +import org.usfirst.frc.team3501.bases.CommandGroup; import org.usfirst.frc.team3501.robot.Robot; import org.usfirst.frc.team3501.robot.commands.*; diff --git a/src/org/usfirst/frc/team3501/robot/commands/CloseClaw.java b/src/org/usfirst/frc/team3501/robot/commands/CloseClaw.java index d4b1199..90e8acc 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/CloseClaw.java +++ b/src/org/usfirst/frc/team3501/robot/commands/CloseClaw.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class CloseClaw extends Command { public CloseClaw() { diff --git a/src/org/usfirst/frc/team3501/robot/commands/Command.java b/src/org/usfirst/frc/team3501/robot/commands/Command.java deleted file mode 100644 index 42c58d6..0000000 --- a/src/org/usfirst/frc/team3501/robot/commands/Command.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands; - -import edu.wpi.first.wpilibj.command.Scheduler; - -public abstract class Command - extends edu.wpi.first.wpilibj.command.Command - implements CommandBase { - - public Command(String commandName) { - super(commandName); - } - - protected void schedule(Command c) { - Scheduler.getInstance().add(c); - } - - protected void initialize() {} - - protected void execute() {} - - protected void end() {} - - protected void interrupted() {} -} diff --git a/src/org/usfirst/frc/team3501/robot/commands/CommandBase.java b/src/org/usfirst/frc/team3501/robot/commands/CommandBase.java deleted file mode 100644 index 3a5044e..0000000 --- a/src/org/usfirst/frc/team3501/robot/commands/CommandBase.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands; - -import org.usfirst.frc.team3501.robot.AutonData; -import org.usfirst.frc.team3501.robot.OI; -import org.usfirst.frc.team3501.robot.Robot; -import org.usfirst.frc.team3501.robot.subsystems.*; - -public interface CommandBase { - - final static OI oi = Robot.oi; - - final static AutonData autonData = Robot.autonData; - - final static Drivetrain drivetrain = Robot.drivetrain; - final static Arm arm = Robot.arm; - final static Claw claw = Robot.claw; - - final static Pneumatics pneumatics = Robot.pneumatics; -} diff --git a/src/org/usfirst/frc/team3501/robot/commands/CommandGroup.java b/src/org/usfirst/frc/team3501/robot/commands/CommandGroup.java deleted file mode 100644 index fcb7d26..0000000 --- a/src/org/usfirst/frc/team3501/robot/commands/CommandGroup.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands; - -public class CommandGroup - extends edu.wpi.first.wpilibj.command.CommandGroup - implements CommandBase { - - public CommandGroup(String commandGroupName) { - super(commandGroupName); - } -} diff --git a/src/org/usfirst/frc/team3501/robot/commands/DriveFor.java b/src/org/usfirst/frc/team3501/robot/commands/DriveFor.java index 295834b..95aae89 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/DriveFor.java +++ b/src/org/usfirst/frc/team3501/robot/commands/DriveFor.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class DriveFor extends Command { private double speed; diff --git a/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java b/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java index cf5446a..5e935c9 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java +++ b/src/org/usfirst/frc/team3501/robot/commands/DriveWithJoysticks.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class DriveWithJoysticks extends Command { public DriveWithJoysticks() { diff --git a/src/org/usfirst/frc/team3501/robot/commands/MoveArm.java b/src/org/usfirst/frc/team3501/robot/commands/MoveArm.java index e209771..8043753 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/MoveArm.java +++ b/src/org/usfirst/frc/team3501/robot/commands/MoveArm.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class MoveArm extends Command { public MoveArm() { diff --git a/src/org/usfirst/frc/team3501/robot/commands/MoveArmFor.java b/src/org/usfirst/frc/team3501/robot/commands/MoveArmFor.java index b9f3bc7..eb2a5ce 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/MoveArmFor.java +++ b/src/org/usfirst/frc/team3501/robot/commands/MoveArmFor.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class MoveArmFor extends Command { private double speed; diff --git a/src/org/usfirst/frc/team3501/robot/commands/OpenClaw.java b/src/org/usfirst/frc/team3501/robot/commands/OpenClaw.java index 6adb5a7..397dcf4 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/OpenClaw.java +++ b/src/org/usfirst/frc/team3501/robot/commands/OpenClaw.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class OpenClaw extends Command { public OpenClaw() { diff --git a/src/org/usfirst/frc/team3501/robot/commands/TensionLeftWinch.java b/src/org/usfirst/frc/team3501/robot/commands/TensionLeftWinch.java index b915896..3a5ac17 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/TensionLeftWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/TensionLeftWinch.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class TensionLeftWinch extends Command { private double speed; diff --git a/src/org/usfirst/frc/team3501/robot/commands/TensionRightWinch.java b/src/org/usfirst/frc/team3501/robot/commands/TensionRightWinch.java index 30dfb10..993302c 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/TensionRightWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/TensionRightWinch.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class TensionRightWinch extends Command { private double speed; diff --git a/src/org/usfirst/frc/team3501/robot/commands/ToggleClaw.java b/src/org/usfirst/frc/team3501/robot/commands/ToggleClaw.java index b7e7b52..802baf8 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/ToggleClaw.java +++ b/src/org/usfirst/frc/team3501/robot/commands/ToggleClaw.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class ToggleClaw extends Command { public ToggleClaw() { diff --git a/src/org/usfirst/frc/team3501/robot/commands/TurnOffCompressor.java b/src/org/usfirst/frc/team3501/robot/commands/TurnOffCompressor.java index 85838f9..43db593 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/TurnOffCompressor.java +++ b/src/org/usfirst/frc/team3501/robot/commands/TurnOffCompressor.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class TurnOffCompressor extends Command { public TurnOffCompressor() { diff --git a/src/org/usfirst/frc/team3501/robot/commands/TurnOnCompressor.java b/src/org/usfirst/frc/team3501/robot/commands/TurnOnCompressor.java index 49853f2..6905764 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/TurnOnCompressor.java +++ b/src/org/usfirst/frc/team3501/robot/commands/TurnOnCompressor.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.bases.Command; + public class TurnOnCompressor extends Command { public TurnOnCompressor() {