comment out necessary stuff in OI
authorCindy Zhang <cindyzyx9@gmail.com>
Sun, 21 Feb 2016 05:32:11 +0000 (21:32 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Mon, 22 Feb 2016 23:59:35 +0000 (15:59 -0800)
src/org/usfirst/frc/team3501/robot/OI.java
src/org/usfirst/frc/team3501/robot/Robot.java

index aa58ffccde0c62a84520a6426eeaf1a3154be266..e2d821656202b4e09b43e74bd7bd785efb95ee1e 100644 (file)
@@ -1,26 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
-import org.usfirst.frc.team3501.robot.commands.auton.CompactRobot;
-import org.usfirst.frc.team3501.robot.commands.auton.PassChevalDeFrise;
-import org.usfirst.frc.team3501.robot.commands.auton.PassDrawBridge;
-import org.usfirst.frc.team3501.robot.commands.auton.PassPortcullis;
-import org.usfirst.frc.team3501.robot.commands.auton.PassSallyPort;
-import org.usfirst.frc.team3501.robot.commands.driving.Turn180;
-import org.usfirst.frc.team3501.robot.commands.intakearm.IntakeBall;
-import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArmToAngle;
-import org.usfirst.frc.team3501.robot.commands.scaler.ExtendLift;
-import org.usfirst.frc.team3501.robot.commands.scaler.RetractLift;
-import org.usfirst.frc.team3501.robot.commands.scaler.RunWinchContinuous;
-import org.usfirst.frc.team3501.robot.commands.scaler.StopWinch;
-import org.usfirst.frc.team3501.robot.commands.scaler.ToggleScaling;
-import org.usfirst.frc.team3501.robot.commands.shooter.Shoot;
-import org.usfirst.frc.team3501.robot.commands.shooter.runShooter;
-import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
-
-import edu.wpi.first.wpilibj.DigitalInput;
 import edu.wpi.first.wpilibj.Joystick;
 import edu.wpi.first.wpilibj.buttons.Button;
-import edu.wpi.first.wpilibj.buttons.JoystickButton;
 
 public class OI {
   public static Joystick leftJoystick;
@@ -57,86 +38,86 @@ public class OI {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
-    passPortcullis = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT));
-    passPortcullis.whenPressed(new PassPortcullis());
-
-    passChevalDeFrise = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
-    passChevalDeFrise.whenPressed(new PassChevalDeFrise());
-
-    passDrawbridge = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_DRAWBRIDGE_PORT));
-    passDrawbridge.whenPressed(new PassDrawBridge());
-
-    passSallyPort = new DigitalButton(
-        new DigitalInput(Constants.OI.PASS_SALLYPORT_PORT));
-    passSallyPort.whenPressed(new PassSallyPort());
-
-    lowerChevalDeFrise = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
-    lowerChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
-        IntakeArm.potAngles[0], IntakeArm.moveIntakeArmSpeed));
-
-    moveToIntakeBoulder = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
-    moveToIntakeBoulder.whenPressed(new MoveIntakeArmToAngle(
-        IntakeArm.potAngles[1], IntakeArm.moveIntakeArmSpeed));
-
-    poiseAboveChevalDeFrise = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
-    poiseAboveChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
-        IntakeArm.potAngles[2], IntakeArm.moveIntakeArmSpeed));
-
-    moveIntakeArmInsideRobot = new DigitalButton(
-        new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
-    moveIntakeArmInsideRobot.whenPressed(new MoveIntakeArmToAngle(
-        IntakeArm.potAngles[3], IntakeArm.moveIntakeArmSpeed));
-
-    toggleShooter = new JoystickButton(leftJoystick,
-        Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
-    SpinRobot180_1 = new JoystickButton(leftJoystick,
-        Constants.OI.SPIN1_PORT);
-    SpinRobot180_1.whenPressed(new Turn180());
-
-    SpinRobot180_2 = new JoystickButton(leftJoystick,
-        Constants.OI.SPIN2_PORT);
-    SpinRobot180_2.whenPressed(new Turn180());
-
-    compactRobot_1 = new JoystickButton(leftJoystick,
-        Constants.OI.LEFT_JOYSTICK_TOP_CENTER_PORT);
-    compactRobot_2 = new JoystickButton(leftJoystick,
-        Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT);
-
-    intakeBoulder = new JoystickButton(rightJoystick,
-        Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
-    shootBoulder = new JoystickButton(rightJoystick,
-        Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
-
-    toggleScaling = new DigitalButton(
-        new DigitalInput(Constants.OI.TOGGLE_SCALING_PORT));
-    toggleScaling.whenPressed(new ToggleScaling());
-
-    if (!Constants.Scaler.SCALING) {
-      toggleShooter.toggleWhenPressed(new runShooter());
-      compactRobot_1.whenPressed(new CompactRobot());
-      compactRobot_2.whenPressed(new CompactRobot());
-
-      intakeBoulder.whenPressed(new IntakeBall());
-      shootBoulder.whenPressed(new Shoot());
-
-    } else {
-      // toggleShooter becomes winch
-      // compact robot button 1 and 2 retracts the lift
-      // intake button stops the winch
-      // shoot button extends the lift
-      toggleShooter.whenPressed(new RunWinchContinuous(
-          Constants.Scaler.SCALE_SPEED, Constants.Scaler.SECONDS_TO_SCALE));
-      compactRobot_1.whenPressed(new RetractLift());
-      compactRobot_2.whenPressed(new RetractLift());
-
-      intakeBoulder.whenReleased(new StopWinch());
-      shootBoulder.whenPressed(new ExtendLift());
-    }
+    // passPortcullis = new DigitalButton(
+    // new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT));
+    // passPortcullis.whenPressed(new PassPortcullis());
+    //
+    // passChevalDeFrise = new DigitalButton(
+    // new DigitalInput(Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
+    // passChevalDeFrise.whenPressed(new PassChevalDeFrise());
+    //
+    // passDrawbridge = new DigitalButton(
+    // new DigitalInput(Constants.OI.PASS_DRAWBRIDGE_PORT));
+    // passDrawbridge.whenPressed(new PassDrawBridge());
+    //
+    // passSallyPort = new DigitalButton(
+    // new DigitalInput(Constants.OI.PASS_SALLYPORT_PORT));
+    // passSallyPort.whenPressed(new PassSallyPort());
+    //
+    // lowerChevalDeFrise = new DigitalButton(
+    // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
+    // lowerChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
+    // IntakeArm.potAngles[0], IntakeArm.moveIntakeArmSpeed));
+    //
+    // moveToIntakeBoulder = new DigitalButton(
+    // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
+    // moveToIntakeBoulder.whenPressed(new MoveIntakeArmToAngle(
+    // IntakeArm.potAngles[1], IntakeArm.moveIntakeArmSpeed));
+    //
+    // poiseAboveChevalDeFrise = new DigitalButton(
+    // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
+    // poiseAboveChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
+    // IntakeArm.potAngles[2], IntakeArm.moveIntakeArmSpeed));
+    //
+    // moveIntakeArmInsideRobot = new DigitalButton(
+    // new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
+    // moveIntakeArmInsideRobot.whenPressed(new MoveIntakeArmToAngle(
+    // IntakeArm.potAngles[3], IntakeArm.moveIntakeArmSpeed));
+    //
+    // toggleShooter = new JoystickButton(leftJoystick,
+    // Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
+    // SpinRobot180_1 = new JoystickButton(leftJoystick,
+    // Constants.OI.SPIN1_PORT);
+    // SpinRobot180_1.whenPressed(new Turn180());
+    //
+    // SpinRobot180_2 = new JoystickButton(leftJoystick,
+    // Constants.OI.SPIN2_PORT);
+    // SpinRobot180_2.whenPressed(new Turn180());
+    //
+    // compactRobot_1 = new JoystickButton(leftJoystick,
+    // Constants.OI.LEFT_JOYSTICK_TOP_CENTER_PORT);
+    // compactRobot_2 = new JoystickButton(leftJoystick,
+    // Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT);
+    //
+    // intakeBoulder = new JoystickButton(rightJoystick,
+    // Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
+    // shootBoulder = new JoystickButton(rightJoystick,
+    // Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
+    //
+    // toggleScaling = new DigitalButton(
+    // new DigitalInput(Constants.OI.TOGGLE_SCALING_PORT));
+    // toggleScaling.whenPressed(new ToggleScaling());
+    //
+    // if (!Constants.Scaler.SCALING) {
+    // toggleShooter.toggleWhenPressed(new runShooter());
+    // compactRobot_1.whenPressed(new CompactRobot());
+    // compactRobot_2.whenPressed(new CompactRobot());
+    //
+    // intakeBoulder.whenPressed(new IntakeBall());
+    // shootBoulder.whenPressed(new Shoot());
+    //
+    // } else {
+    // // toggleShooter becomes winch
+    // // compact robot button 1 and 2 retracts the lift
+    // // intake button stops the winch
+    // // shoot button extends the lift
+    // toggleShooter.whenPressed(new RunWinchContinuous(
+    // Constants.Scaler.SCALE_SPEED, Constants.Scaler.SECONDS_TO_SCALE));
+    // compactRobot_1.whenPressed(new RetractLift());
+    // compactRobot_2.whenPressed(new RetractLift());
+    //
+    // intakeBoulder.whenReleased(new StopWinch());
+    // shootBoulder.whenPressed(new ExtendLift());
+    // }
   }
 }
index 9bc45b8f2c73ca742e7f332ff1fee083c63201ca..8beb817d189bba11dd761c6f2f3da5ffa05a60a2 100644 (file)
@@ -1,6 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
 import org.usfirst.frc.team3501.robot.Constants.Defense;
+import org.usfirst.frc.team3501.robot.commands.driving.JoystickDrive;
 import org.usfirst.frc.team3501.robot.subsystems.DefenseArm;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
@@ -25,7 +26,7 @@ public class Robot extends IterativeRobot {
   // Sendable Choosers send a drop down menu to the Smart Dashboard.
   SendableChooser positionChooser;
   SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
-  positionFourDefense, positionFiveDefense;
+      positionFourDefense, positionFiveDefense;
 
   @Override
   public void robotInit() {
@@ -137,7 +138,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
-    // Scheduler.getInstance().add(new JoystickDrive());
+    Scheduler.getInstance().add(new JoystickDrive());
 
   }