Prepare for intake arm test
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 8beb817d189bba11dd761c6f2f3da5ffa05a60a2..a060c88e8c0a42745edfc61b7aae67fb374b3f6b 100644 (file)
@@ -1,7 +1,6 @@
 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;
@@ -33,10 +32,10 @@ public class Robot extends IterativeRobot {
     driveTrain = new DriveTrain();
     oi = new OI();
 
-    // shooter = new Shooter();
-    // scaler = new Scaler();
-    // intakeArm = new IntakeArm();
-    //
+    shooter = new Shooter();
+    scaler = new Scaler();
+    intakeArm = new IntakeArm();
+
     // initializeSendableChoosers();
     // addPositionChooserOptions();
     // addDefensesToAllDefenseSendableChoosers();
@@ -86,17 +85,15 @@ public class Robot extends IterativeRobot {
     SmartDashboard.putData("Position Two Defense Chooser", positionTwoDefense);
     SmartDashboard.putData("Position Three Defense Chooser",
         positionThreeDefense);
-    SmartDashboard.putData("Position Four Defense Chooser",
-        positionFourDefense);
-    SmartDashboard.putData("Position Five Defense Chooser",
-        positionFiveDefense);
+    SmartDashboard
+        .putData("Position Four Defense Chooser", positionFourDefense);
+    SmartDashboard
+        .putData("Position Five Defense Chooser", positionFiveDefense);
 
-    SmartDashboard.putData("Position Four Defense Chooser",
-        positionFourDefense);
-    SmartDashboard.putData("Position Five Defense Chooser",
-        positionFiveDefense);
-
-    shooter = new Shooter();
+    SmartDashboard
+        .putData("Position Four Defense Chooser", positionFourDefense);
+    SmartDashboard
+        .putData("Position Five Defense Chooser", positionFiveDefense);
 
   }
 
@@ -126,25 +123,27 @@ public class Robot extends IterativeRobot {
   @Override
   public void autonomousPeriodic() {
     Scheduler.getInstance().run();
-    // Scheduler.getInstance().add(new DriveDistance(24, 5));
-    // Scheduler.getInstance().add(new DriveForTime(2, 0.3));
-    // Scheduler.getInstance().add(new TurnForAngle(90, 5));
-    // Scheduler.getInstance().add(
-    // new TurnForTime(3, Constants.Direction.RIGHT, 0.3));
-    // Scheduler.getInstance().add(
-    // new TurnForTime(3, Constants.Direction.LEFT, 0.3));
-    // Scheduler.getInstance().add(new Turn180());
   }
 
   @Override
   public void teleopInit() {
-    Scheduler.getInstance().add(new JoystickDrive());
-
+    Robot.driveTrain.setLowGear();
+    Robot.shooter.raiseHood();
   }
 
   @Override
   public void teleopPeriodic() {
     Scheduler.getInstance().run();
+    if (OI.rightJoystick.getTrigger()) {
+      Robot.shooter.setSpeed(.8);
+    } else {
+      Robot.shooter.setSpeed(0);
+    }
+    if (OI.rightJoystick.getRawButton(2)) {
+      Robot.shooter.extendPunch();
+    } else {
+      Robot.shooter.retractPunch();
+    }
   }
 
 }