Fix conflicts in ToggleGear
authorRohan Rodrigues <rohanrodrigues19@gmail.com>
Thu, 9 Mar 2017 01:11:20 +0000 (17:11 -0800)
committerRohan Rodrigues <rohanrodrigues19@gmail.com>
Thu, 9 Mar 2017 01:11:20 +0000 (17:11 -0800)
src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index 8fa8bc7529a443a76150c9d6e681430521a4f63a..ca802e705291cff2ebd02ae5658a25f9998dd840 100644 (file)
@@ -31,15 +31,9 @@ public class ToggleGear extends Command {
     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();
     }
 
   }
index cf200ebfdd2afcce5d5fc1fa95ee476c25a05cc9..062da20f01a5dd73c36a3dcfcd34f2c227f9a420 100644 (file)
@@ -3,6 +3,10 @@ package org.usfirst.frc.team3501.robot.commands.shooter;
 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;
 
@@ -31,7 +35,11 @@ public class RunIndexWheelContinuous extends Command {
 
   @Override
   protected void initialize() {
+<<<<<<< HEAD
     t.start();
+=======
+    t.reset();
+>>>>>>> Remove getters for shift pistons
   }
 
   @Override
index 10bc4450fa9c2f41421541d9f43e808ac1d27922..bad303aebe622f0db77aa8a41d45e79b92c68325 100644 (file)
@@ -170,33 +170,26 @@ public class DriveTrain extends Subsystem {
     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