add skeleton code for missing commands
authorCindy Zhang <cindyzyx9@gmail.com>
Wed, 25 Jan 2017 03:38:04 +0000 (19:38 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Wed, 25 Jan 2017 03:38:04 +0000 (19:38 -0800)
src/org/usfirst/frc/team3501/robot/commandgroups/PrepareToShoot.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commandgroups/Shoot.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/driving/Turn90Left.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/driving/Turn90Right.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/intake/ReverseIntake.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/intake/ReverseIntakeContinuous.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java [new file with mode: 0644]

diff --git a/src/org/usfirst/frc/team3501/robot/commandgroups/PrepareToShoot.java b/src/org/usfirst/frc/team3501/robot/commandgroups/PrepareToShoot.java
new file mode 100644 (file)
index 0000000..3266836
--- /dev/null
@@ -0,0 +1,28 @@
+package org.usfirst.frc.team3501.robot.commandgroups;
+
+import edu.wpi.first.wpilibj.command.CommandGroup;
+
+/**
+ *
+ */
+public class PrepareToShoot extends CommandGroup {
+
+    public PrepareToShoot() {
+        // Add Commands here:
+        // e.g. addSequential(new Command1());
+        //      addSequential(new Command2());
+        // these will run in order.
+
+        // To run multiple commands at the same time,
+        // use addParallel()
+        // e.g. addParallel(new Command1());
+        //      addSequential(new Command2());
+        // Command1 and Command2 will run in parallel.
+
+        // A command group will require all of the subsystems that each member
+        // would require.
+        // e.g. if Command1 requires chassis, and Command2 requires arm,
+        // a CommandGroup containing them would require both the chassis and the
+        // arm.
+    }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commandgroups/Shoot.java b/src/org/usfirst/frc/team3501/robot/commandgroups/Shoot.java
new file mode 100644 (file)
index 0000000..18e3568
--- /dev/null
@@ -0,0 +1,28 @@
+package org.usfirst.frc.team3501.robot.commandgroups;
+
+import edu.wpi.first.wpilibj.command.CommandGroup;
+
+/**
+ *
+ */
+public class Shoot extends CommandGroup {
+
+    public Shoot() {
+        // Add Commands here:
+        // e.g. addSequential(new Command1());
+        //      addSequential(new Command2());
+        // these will run in order.
+
+        // To run multiple commands at the same time,
+        // use addParallel()
+        // e.g. addParallel(new Command1());
+        //      addSequential(new Command2());
+        // Command1 and Command2 will run in parallel.
+
+        // A command group will require all of the subsystems that each member
+        // would require.
+        // e.g. if Command1 requires chassis, and Command2 requires arm,
+        // a CommandGroup containing them would require both the chassis and the
+        // arm.
+    }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java b/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
new file mode 100644 (file)
index 0000000..7a0c601
--- /dev/null
@@ -0,0 +1,45 @@
+package org.usfirst.frc.team3501.robot.commands.driving;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * This command toggles the speed at which the drive train runs at
+ *
+ * post-condition: if the drivetrain is running at high gear, it will be made to
+ * run at low gear, and vice versa
+ */
+public class ToggleGear extends Command {
+
+  public ToggleGear() {
+    requires(Robot.getDriveTrain());
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Make this return true when this Command no longer needs to run execute()
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/Turn90Left.java b/src/org/usfirst/frc/team3501/robot/commands/driving/Turn90Left.java
new file mode 100644 (file)
index 0000000..fd63312
--- /dev/null
@@ -0,0 +1,44 @@
+package org.usfirst.frc.team3501.robot.commands.driving;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * This command turns the robot exactly 90 degrees towards the left
+ *
+ * parameters: none
+ */
+public class Turn90Left extends Command {
+
+  public Turn90Left() {
+    requires(Robot.getDriveTrain());
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Make this return true when this Command no longer needs to run execute()
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/Turn90Right.java b/src/org/usfirst/frc/team3501/robot/commands/driving/Turn90Right.java
new file mode 100644 (file)
index 0000000..374072e
--- /dev/null
@@ -0,0 +1,44 @@
+package org.usfirst.frc.team3501.robot.commands.driving;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * This command turns the robot exactly 90 degrees towards the right
+ *
+ * parameters: none
+ */
+public class Turn90Right extends Command {
+
+  public Turn90Right() {
+    requires(Robot.getDriveTrain());
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Make this return true when this Command no longer needs to run execute()
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/intake/ReverseIntake.java b/src/org/usfirst/frc/team3501/robot/commands/intake/ReverseIntake.java
new file mode 100644 (file)
index 0000000..580b059
--- /dev/null
@@ -0,0 +1,43 @@
+package org.usfirst.frc.team3501.robot.commands.intake;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * Reverses the intake roller for a specified amount of time in seconds
+ *
+ * parameters: time to run intake
+ */
+public class ReverseIntake extends Command {
+
+  public ReverseIntake(double timeToMove) {
+    // Use requires() here to declare subsystem dependencies
+    // eg. requires(chassis);
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Make this return true when this Command no longer needs to run execute()
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/intake/ReverseIntakeContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/intake/ReverseIntakeContinuous.java
new file mode 100644 (file)
index 0000000..bab630d
--- /dev/null
@@ -0,0 +1,43 @@
+package org.usfirst.frc.team3501.robot.commands.intake;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * Reverses the intake until the button triggering this command is released
+ *
+ * pre-condition: button is pressed
+ */
+public class ReverseIntakeContinuous extends Command {
+
+  public ReverseIntakeContinuous(double timeToMove) {
+    // Use requires() here to declare subsystem dependencies
+    // eg. requires(chassis);
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Make this return true when this Command no longer needs to run execute()
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/DecreaseShootingSpeed.java
new file mode 100644 (file)
index 0000000..23ac1a8
--- /dev/null
@@ -0,0 +1,44 @@
+package org.usfirst.frc.team3501.robot.commands.shooter;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * This command decreases the speed at which the flywheel runs at by a fixed
+ * constant
+ *
+ * post-condition: the shooting speed is decremented, such that whenever the
+ * flywheel is run, it will run at the decreased shooting speed
+ */
+public class DecreaseShootingSpeed extends Command {
+  public DecreaseShootingSpeed() {
+
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+
+  @Override
+  protected boolean isFinished() {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/IncreaseShootingSpeed.java
new file mode 100644 (file)
index 0000000..aeb74ec
--- /dev/null
@@ -0,0 +1,44 @@
+package org.usfirst.frc.team3501.robot.commands.shooter;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * This command increases the speed at which the flywheel runs at by a fixed
+ * constant
+ *
+ * post-condition: the shooting speed is incremented, such that whenever the
+ * flywheel is run, it will run at the increased shooting speed
+ */
+public class IncreaseShootingSpeed extends Command {
+  public IncreaseShootingSpeed() {
+
+  }
+
+  // Called just before this Command runs the first time
+  @Override
+  protected void initialize() {
+  }
+
+  // Called repeatedly when this Command is scheduled to run
+  @Override
+  protected void execute() {
+  }
+
+  // Called once after isFinished returns true
+  @Override
+  protected void end() {
+  }
+
+  // Called when another command which requires one or more of the same
+  // subsystems is scheduled to run
+  @Override
+  protected void interrupted() {
+  }
+
+  @Override
+  protected boolean isFinished() {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+}