From: Shivani Ghanta Date: Sat, 6 Feb 2016 22:54:57 +0000 (-0800) Subject: fix Robot.java bug: intantiate IntakeArm subsystem, not constants X-Git-Url: http://challenge-bot.com/repos/?a=commitdiff_plain;h=f81370d3185d07cf82e32b8aa49ea62d5f5fbd4d;p=3501%2Fstronghold-2016 fix Robot.java bug: intantiate IntakeArm subsystem, not constants --- diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index 71685c51..e022abe6 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -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 diff --git a/src/org/usfirst/frc/team3501/robot/commands/MoveIntakeArm.java b/src/org/usfirst/frc/team3501/robot/commands/MoveIntakeArm.java index 8f19f39a..7dbabcb4 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/MoveIntakeArm.java +++ b/src/org/usfirst/frc/team3501/robot/commands/MoveIntakeArm.java @@ -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