Skip to content

Commit

Permalink
change anyInactive to allInactive
Browse files Browse the repository at this point in the history
  • Loading branch information
oh-yes-0-fps committed Jan 22, 2025
1 parent 2c65b26 commit e14e072
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions choreolib/src/main/java/choreo/auto/AutoRoutine.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,17 @@ public Trigger anyActive(AutoTrajectory trajectory, AutoTrajectory... trajectori

/**
* Creates a trigger that returns true when any of the trajectories given are inactive.
*
* <p>This trigger will only return true if the routine is active.
*
* @param trajectory The first trajectory to watch.
* @param trajectories The other trajectories to watch
* @return a trigger that determines if any of the trajectories are inactive
*/
public Trigger anyInactive(AutoTrajectory trajectory, AutoTrajectory... trajectories) {
public Trigger allInactive(AutoTrajectory trajectory, AutoTrajectory... trajectories) {
var trigger = trajectory.inactive();
for (int i = 0; i < trajectories.length; i++) {
trigger = trigger.or(trajectories[i].inactive());
trigger = trigger.and(trajectories[i].inactive());
}
return trigger.and(this.active());
}
Expand Down

0 comments on commit e14e072

Please sign in to comment.