+ // ------Gyro------//
+ public double getAngle() {
+ return this.imu.getAngle();
+ }
+
+ public void resetGyro() {
+ this.imu.reset();
+ }
+
+ /*
+ * @return a value that is the current setpoint for the piston kReverse or
+ * KForward
+ */
+ // public boolean getLeftDriveTrainPiston() {
+ // return leftDriveTrainPiston.get();
+ // }
+
+ /*
+ * @return a value that is the current setpoint for the piston kReverse or
+ * KForward
+ */
+ public Value getRightDriveTrainPiston() {
+ return rightDriveTrainPiston.get();
+ }
+
+ /*
+ * Changes the ball shift gear assembly to high
+ */
+ public void setHighGear() {
+ changeGear(Constants.DriveTrain.FORWARD_PISTON_VALUE);
+ }
+
+ /*
+ * Changes the ball shift gear assembly to low
+ */
+ public void setLowGear() {
+ changeGear(Constants.DriveTrain.REVERSE_PISTON_VALUE);
+ }
+
+ /*
+ * Changes the gear to a DoubleSolenoid.Value
+ */
+ private void changeGear(DoubleSolenoid.Value gear) {
+ System.out.println("shifting to " + gear);
+ rightDriveTrainPiston.set(gear);
+ System.out.println("after: " + this.getRightDriveTrainPiston());
+
+ //
+ // if (gear == Constants.DriveTrain.FORWARD_PISTON_VALUE)
+ // leftDriveTrainPiston.set(Constants.DriveTrain.EXTEND_VALUE);
+ // else
+ // leftDriveTrainPiston.set(Constants.DriveTrain.RETRACT_VALUE);
+ }
+
+ public Value getGearManipulatorPistonValue() {
+ return gearManipulatorPiston.get();
+ }
+
+ public void extendGearManipulatorPiston() {
+ gearManipulatorPiston.set(Constants.DriveTrain.FORWARD_PISTON_VALUE);
+ }
+
+ public void retractGearManipulatorPiston() {
+ gearManipulatorPiston.set(Constants.DriveTrain.REVERSE_PISTON_VALUE);
+ }
+