Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix supply current limit test
Browse files Browse the repository at this point in the history
bhall-ctre committed Apr 30, 2024
1 parent 9fb0a6d commit 753cf1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/CurrentLimits/src/test/java/CurrentLimitTests.java
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ public void testSupplyLimit() {
supplyCurrent.waitForUpdate(1);

System.out.println("Supply current is " + supplyCurrent);
assertTrue(supplyCurrent.getValue() > 100); // Supply current should be in excess of 100 amps
assertTrue(supplyCurrent.getValue() > 80); // Supply current should be in excess of 80 amps

/* Now apply the supply current limit */
currentLimitConfigs.SupplyCurrentLimitEnable = true;
@@ -126,7 +126,7 @@ public void testSupplyLimit() {
supplyCurrent.waitForUpdate(1);

System.out.println("Supply current is " + supplyCurrent);
assertTrue(supplyCurrent.getValue() > 100); // Make sure it's still over 100 amps (time hasn't exceeded 1 second in total)
assertTrue(supplyCurrent.getValue() > 80); // Make sure it's still over 80 amps (time hasn't exceeded 1 second in total)

/* Wait a full extra couple seconds so the limit kicks in and starts limiting us */
Timer.delay(2);

0 comments on commit 753cf1b

Please sign in to comment.