From 2aea5cc24d3d2ff9edf66c5a3faf53e2c6811ca3 Mon Sep 17 00:00:00 2001 From: Shaina Chen Date: Sat, 13 Feb 2016 17:21:03 -0800 Subject: [PATCH] add getter methods for gear piston values --- .../frc/team3501/robot/subsystems/DriveTrain.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java index 5e9f2bd9..56d8066b 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java @@ -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 } -- 2.30.2