diff --git a/src/org/impact2585/frc2016/systems/WheelSystem.java b/src/org/impact2585/frc2016/systems/WheelSystem.java index 54ac97f..1a6072e 100644 --- a/src/org/impact2585/frc2016/systems/WheelSystem.java +++ b/src/org/impact2585/frc2016/systems/WheelSystem.java @@ -104,10 +104,8 @@ public void run() { else currentRampForward = desiredRampForward; } - } - - //sets currentRampForward immediately to 0 if the input is 0 - else + }else + //sets currentRampForward immediately to 0 if the input is 0 currentRampForward = 0; drive(currentRampForward, rotationValue); diff --git a/test/org/impact2585/frc2016/tests/WheelSystemTest.java b/test/org/impact2585/frc2016/tests/WheelSystemTest.java index 8d5128b..0afb0fd 100644 --- a/test/org/impact2585/frc2016/tests/WheelSystemTest.java +++ b/test/org/impact2585/frc2016/tests/WheelSystemTest.java @@ -95,6 +95,11 @@ public void test() { driveForward = 0.5; drivetrain.run(); Assert.assertTrue(currentRampForward == 0.046875 && rotate == 0.7); + + // see if movement and rotation go back to 0 again + rotate = driveForward = 0; + drivetrain.run(); + Assert.assertTrue(currentRampForward == 0 && rotate == 0); } /**