From: Shaina Chen Date: Sun, 14 Feb 2016 01:21:03 +0000 (-0800) Subject: add getter methods for gear piston values X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=2aea5cc24d3d2ff9edf66c5a3faf53e2c6811ca3 add getter methods for gear piston values --- 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 }