Add pid subsystem
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / IntakeArm.java
index ceac71fb1d4ca5a424c01b26eb10168658f9c94c..a9e9ecd5148c0f76dd045c8e38b4550dc47373cf 100755 (executable)
@@ -30,7 +30,6 @@ public class IntakeArm extends Subsystem {
     intakeArm = new CANTalon(Constants.IntakeArm.ARM_PORT);
     intakePot = new AnalogPotentiometer(Constants.IntakeArm.POT_CHANNEL,
         Constants.IntakeArm.FULL_RANGE, Constants.IntakeArm.OFFSET);
-
   }
 
   /***
@@ -49,6 +48,10 @@ public class IntakeArm extends Subsystem {
     intakeRoller.set(Constants.IntakeArm.OUTPUT_SPEED);
   }
 
+  public void stopRollers() {
+    intakeRoller.set(0);
+  }
+
   /***
    * This method gets you the current voltage of the motor that controls the
    * intake arm roller. The range of voltage is from [-1,1]. A negative voltage
@@ -117,6 +120,8 @@ public class IntakeArm extends Subsystem {
    */
 
   public boolean areRollersRolling() {
+    if (Math.abs(getRollerVoltage()) < 0.02)
+      return false;
     return true;
   }