Skip to content
This repository has been archived by the owner on Dec 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #27 from LoadingPleaseWait/master
Browse files Browse the repository at this point in the history
Fix formatting in WheelSystem and add a little to WheelSystemTest
  • Loading branch information
AmanuelBayu committed Feb 15, 2016
2 parents e0c404c + 6d16165 commit 7a8f064
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/org/impact2585/frc2016/systems/WheelSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions test/org/impact2585/frc2016/tests/WheelSystemTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 7a8f064

Please sign in to comment.