Value rightGearPistonValue = driveTrain.getRightGearPistonValue();
if (leftGearPistonValue == Constants.DriveTrain.LOW_GEAR) {
- driveTrain.setHighGear(driveTrain.getLeftPiston());
+ driveTrain.setHighGear();
} else {
- driveTrain.setLowGear(driveTrain.getLeftPiston());
- }
-
- if (rightGearPistonValue == Constants.DriveTrain.LOW_GEAR) {
- driveTrain.setHighGear(driveTrain.getRightPiston());
- } else {
- driveTrain.setLowGear(driveTrain.getRightPiston());
+ driveTrain.setLowGear();
}
}
import org.usfirst.frc.team3501.robot.Robot;
import org.usfirst.frc.team3501.robot.Constants;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+<<<<<<< HEAD
+=======
+
+>>>>>>> Remove getters for shift pistons
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.command.Command;
@Override
protected void initialize() {
+<<<<<<< HEAD
t.start();
+=======
+ t.reset();
+>>>>>>> Remove getters for shift pistons
}
@Override
return rightGearPiston.get();
}
- public DoubleSolenoid getLeftPiston() {
- return this.leftGearPiston;
- }
-
- public DoubleSolenoid getRightPiston() {
- return this.rightGearPiston;
- }
-
/*
* Changes the ball shift gear assembly to high
*/
- public void setHighGear(DoubleSolenoid p) {
- changeGear(Constants.DriveTrain.HIGH_GEAR, p);
+ public void setHighGear() {
+ changeGear(Constants.DriveTrain.HIGH_GEAR);
}
/*
* Changes the ball shift gear assembly to low
*/
- public void setLowGear(DoubleSolenoid p) {
- changeGear(Constants.DriveTrain.LOW_GEAR, p);
+ public void setLowGear() {
+ changeGear(Constants.DriveTrain.LOW_GEAR);
}
/*
* Changes the gear to a DoubleSolenoid.Value
*/
- private void changeGear(DoubleSolenoid.Value gear, DoubleSolenoid piston) {
- piston.set(gear);
+ private void changeGear(DoubleSolenoid.Value gear) {
+ leftGearPiston.set(gear);
+ rightGearPiston.set(gear);
}
@Override