fix Robot.java bug: intantiate IntakeArm subsystem, not constants
authorShivani Ghanta <shivanighanta@Shivanis-MacBook-Pro.local>
Sat, 6 Feb 2016 22:54:57 +0000 (14:54 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Sat, 13 Feb 2016 19:52:19 +0000 (11:52 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/commands/MoveIntakeArm.java

index 71685c51327524058ee33760c112549a40dde356..e022abe6dc897426e9d880d576c334c3acb8a71b 100644 (file)
@@ -3,6 +3,7 @@ package org.usfirst.frc.team3501.robot;
 import org.usfirst.frc.team3501.robot.Constants.Defense;
 import org.usfirst.frc.team3501.robot.subsystems.DefenseArm;
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
+import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
 import org.usfirst.frc.team3501.robot.subsystems.Scaler;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
 
@@ -17,6 +18,7 @@ public class Robot extends IterativeRobot {
   public static Shooter shooter;
   public static Scaler scaler;
   public static DefenseArm defenseArm;
+  public static IntakeArm intakeArm;
 
   // Sendable Choosers send a drop down menu to the Smart Dashboard.
   SendableChooser positionChooser;
@@ -30,6 +32,7 @@ public class Robot extends IterativeRobot {
     shooter = new Shooter();
     scaler = new Scaler();
     defenseArm = new DefenseArm();
+       intakeArm = new IntakeArm();
 
     // Sendable Choosers allows the driver to select the position of the robot
     // and the positions of the defenses from a drop-down menu on the Smart
index 8f19f39a162f45e7addf4c895b08bee364ea2aa6..7dbabcb4d0e6a79d913a64e6e955cbc68e7de981 100755 (executable)
@@ -1,18 +1,25 @@
 package org.usfirst.frc.team3501.robot.commands;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 public class MoveIntakeArm extends Command {
 
        public MoveIntakeArm() {
+               requires(Robot.intakeArm);
        }
 
        @Override
        protected void initialize() {
+               Robot.intakeArm.getArmAngle();
        }
 
        @Override
        protected void execute() {
+               if (Robot.intakeArm.getArmVoltage() == 1) {
+
+               }
        }
 
        @Override