X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fdriving%2FToggleGear.java;h=8fa8bc7529a443a76150c9d6e681430521a4f63a;hb=6b2fc22f2340904faee55cf5c84c57f59188f1d9;hp=ca802e705291cff2ebd02ae5658a25f9998dd840;hpb=fe04fc8e547ee347079730ca38e1a529f870b00c;p=3501%2F2017steamworks 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 ca802e7..8fa8bc7 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleGear.java @@ -31,9 +31,15 @@ public class ToggleGear extends Command { Value rightGearPistonValue = driveTrain.getRightGearPistonValue(); if (leftGearPistonValue == Constants.DriveTrain.LOW_GEAR) { - driveTrain.setHighGear(); + driveTrain.setHighGear(driveTrain.getLeftPiston()); } else { - driveTrain.setLowGear(); + driveTrain.setLowGear(driveTrain.getLeftPiston()); + } + + if (rightGearPistonValue == Constants.DriveTrain.LOW_GEAR) { + driveTrain.setHighGear(driveTrain.getRightPiston()); + } else { + driveTrain.setLowGear(driveTrain.getRightPiston()); } }