add three more limit switches due to change in strategy
authorLauren Meier <meier.lauren@gmail.com>
Tue, 17 Nov 2015 04:22:54 +0000 (20:22 -0800)
committerLauren Meier <meier.lauren@gmail.com>
Tue, 17 Nov 2015 04:22:54 +0000 (20:22 -0800)
src/org/usfirst/frc3501/RiceCatRobot/RobotMap.java
src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java

index 40c09b633d757beb9364ab4896f92d243be806de..9b6d60d2feec1dc6ec24bfa2e3f56c33888a7c7c 100644 (file)
@@ -23,7 +23,7 @@ public class RobotMap {
 
   public static final int ARM_LEFT = 2, ARM_RIGHT = 7;
   public static final double ARM_HIGH_SPEED = 0.5, ARM_LOW_SPEED = 0.5;
-  public static final int ARM_LIMIT_RIGHT = 0;
+  public static final int ARM_LIMIT_1 = 0, ARM_LIMIT_2 = 1, ARM_LIMIT_3 = 2, ARM_LIMIT_4 = 3;
 
   // Claw
   public static final int SOLENOID_FORWARD = 0, SOLENOID_REVERSE = 1,
index ff970400e59f5a7accda1904d647c4d348f5fb05..cb0cc38a3d5732e09b475c9018641ba7ce548d9f 100644 (file)
@@ -8,12 +8,15 @@ import edu.wpi.first.wpilibj.command.Subsystem;
 
 public class Arm extends Subsystem {
   private CANJaguar left, right;
-  private DigitalInput limitSwitch;
+  private DigitalInput limit1, limit2, limit3, limit4;
 
   public Arm() {
     left = new CANJaguar(RobotMap.ARM_LEFT);
     right = new CANJaguar(RobotMap.ARM_RIGHT);
-    limitSwitch = new DigitalInput(RobotMap.ARM_LIMIT_RIGHT);
+    limit1 = new DigitalInput(RobotMap.ARM_LIMIT_1);
+    limit2 = new DigitalInput(RobotMap.ARM_LIMIT_2);
+    limit3 = new DigitalInput(RobotMap.ARM_LIMIT_3);
+    limit4 = new DigitalInput(RobotMap.ARM_LIMIT_4);
   }
 
   public void initDefaultCommand() {