add getter methods for gear piston values
authorShaina Chen <shaina.sierra@gmail.com>
Sun, 14 Feb 2016 01:21:03 +0000 (17:21 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Mon, 15 Feb 2016 00:05:18 +0000 (16:05 -0800)
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 5e9f2bd93daaea7817f8b2951580351b1fa80a5c..56d8066b49d800df8924018a3f4c7844ddb5e2a5 100644 (file)
@@ -8,6 +8,7 @@ import org.usfirst.frc.team3501.robot.commands.driving.JoystickDrive;
 import edu.wpi.first.wpilibj.CANTalon;
 import edu.wpi.first.wpilibj.CounterBase.EncodingType;
 import edu.wpi.first.wpilibj.DoubleSolenoid;
+import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
 import edu.wpi.first.wpilibj.Encoder;
 import edu.wpi.first.wpilibj.I2C;
 import edu.wpi.first.wpilibj.RobotDrive;
@@ -39,7 +40,7 @@ public class DriveTrain extends PIDSubsystem {
   // Drivetrain specific constants that relate to the PID controllers
   private final static double Kp = 1.0, Ki = 0.0,
       Kd = 0.0 * (OUTPUT_SPROCKET_DIAMETER / PULSES_PER_ROTATION)
-          / (WHEEL_SPROCKET_DIAMETER) * WHEEL_DIAMETER;
+      / (WHEEL_SPROCKET_DIAMETER) * WHEEL_DIAMETER;
 
   public DriveTrain() {
     super(kp, ki, kd);
@@ -104,6 +105,14 @@ public class DriveTrain extends PIDSubsystem {
     rightEncoder.reset();
   }
 
+  public Value getLeftGearPistonValue() {
+    return leftGearPiston.get();
+  }
+
+  public Value getRightGearPistonValue() {
+    return rightGearPiston.get();
+  }
+
   public double getRightSpeed() {
     return rightEncoder.getRate(); // in inches per second
   }