Fix variable names
authorEvanYap <evanyap.14@gmail.com>
Fri, 22 Jan 2016 02:46:55 +0000 (18:46 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:35 +0000 (19:37 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/OI.java
src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java [deleted file]

index f34630784465bd49ed01c02292b482e54905b7d8..3d05b3f3638fc9c502da69b614273850f6d54c2e 100644 (file)
@@ -10,11 +10,11 @@ public class Constants {
   public static class OI {
     public final static int LEFT_STICK_PORT = 0;
     public final static int RIGHT_STICK_PORT = 0;
-    public final static int RIGHT_STICK_TRIGGER = 0;
+    public final static int TRIGGER_PORT = 0;
 
-    public final static int RIGHT_STICK_LEFT_SILVER_BUTTON = 0;
-    public final static int RIGHT_STICK_RIGHT_SILVER_BUTTON = 0;
-    public final static int RIGHT_STICK_THUMB_BUTTON = 0;
+    public final static int DECREMENT_SHOOTER_PORT = 0;
+    public final static int INCREMENT_SHOOTER_PORT = 0;
+    public final static int SHOOTER_PORT = 0;
   }
 
   public static class DriveTrain {
index d24eb3ab0d73d9a81b15954ee55fee77b619abd2..d644cf7188d0fc6aa53454f5674bf31506fd06c7 100644 (file)
@@ -7,22 +7,25 @@ import edu.wpi.first.wpilibj.buttons.JoystickButton;
 public class OI {
   public static Joystick leftJoystick;
   public static Joystick rightJoystick;
-  public static Button leftSilverButton;
-  public static Button rightSilverButton;
-  public static Button thumbButton;
+  public static Button decrementSpeed;
+  public static Button incrementSpeed;
+  public static Button outputCurrentShooterSpeed;
+  public static Button runWheel;
 
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
-    leftSilverButton = new JoystickButton(rightJoystick,
-        Constants.OI.RIGHT_STICK_LEFT_SILVER_BUTTON);
+    decrementSpeed = new JoystickButton(rightJoystick,
+        Constants.OI.DECREMENT_SHOOTER_PORT);
 
-    rightSilverButton = new JoystickButton(rightJoystick,
-        Constants.OI.RIGHT_STICK_RIGHT_SILVER_BUTTON);
+    incrementSpeed = new JoystickButton(rightJoystick,
+        Constants.OI.INCREMENT_SHOOTER_PORT);
 
-    thumbButton = new JoystickButton(rightJoystick,
-        Constants.OI.RIGHT_STICK_THUMB_BUTTON);
+    outputCurrentShooterSpeed = new JoystickButton(rightJoystick,
+        Constants.OI.SHOOTER_PORT);
+
+    runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
 
   }
 
diff --git a/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java b/src/org/usfirst/frc/team3501/robot/commands/ShooterTest.java
deleted file mode 100644 (file)
index 0759325..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-/**
- *
- */
-public class ShooterTest extends Command {
-
-  public ShooterTest() {
-
-    requires(Robot.shooter);
-  }
-
-  @Override
-  protected void initialize() {
-    Robot.shooter.setSpeed(0.5);
-
-  }
-
-  @Override
-  protected void execute() {
-    boolean triggerPressed = Robot.oi.rightJoystick.getTrigger();
-    boolean leftSidePressed = Robot.oi.leftSilverButton.get();
-    boolean rightSidePressed = Robot.oi.rightSilverButton.get();
-    boolean thumbPressed = Robot.oi.thumbButton.get();
-
-    double currentWheelSpeed = Robot.shooter.getCurrentSpeed();
-
-    if (triggerPressed == true) {
-      Robot.shooter.setSpeed(currentWheelSpeed);
-    } else {
-      Robot.shooter.setSpeed(0.0);
-    }
-
-    if (leftSidePressed == true) {
-      Robot.shooter.decrementSpeed(0.1);
-    }
-
-    if (rightSidePressed == true) {
-      Robot.shooter.incrementSpeed(0.1);
-    }
-
-    if (thumbPressed == true) {
-      System.out.println(Robot.shooter.getCurrentSpeed());
-    }
-
-  }
-
-  // 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() {
-  }
-}