From: Rohan Rodrigues Date: Thu, 9 Mar 2017 01:11:20 +0000 (-0800) Subject: Fix conflicts in ToggleGear X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=b6c65122a978685703718a9d0f1d8ee012cbf9c8 Fix conflicts in ToggleGear --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java b/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java index 8fa8bc7..ca802e7 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java @@ -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(); } } diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java index cf200eb..062da20 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java @@ -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 diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java index 10bc445..bad303a 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java @@ -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