Skip to content

Commit

Permalink
Fix supply current limit test
Browse files Browse the repository at this point in the history
  • Loading branch information
bhall-ctre committed Apr 30, 2024
1 parent 9fb0a6d commit 2ccf86f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions java/CurrentLimits/src/test/java/CurrentLimitTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ private void configureBindings() {
// reset the field-centric heading on left bumper press
joystick.leftBumper().onTrue(drivetrain.runOnce(() -> drivetrain.seedFieldRelative()));

drivetrain.registerTelemetry(logger::telemeterize);

joystick.pov(0).whileTrue(drivetrain.applyRequest(() -> forwardStraight.withVelocityX(0.5).withVelocityY(0)));
joystick.pov(180).whileTrue(drivetrain.applyRequest(() -> forwardStraight.withVelocityX(-0.5).withVelocityY(0)));

drivetrain.registerTelemetry(logger::telemeterize);


/* Bindings for drivetrain characterization */
/* These bindings require multiple buttons pushed to swap between quastatic and dynamic */
Expand Down

0 comments on commit 2ccf86f

Please sign in to comment.