Skip to content

Commit

Permalink
Resolve "Reduce NumDefendersForBall during FreeKicks"
Browse files Browse the repository at this point in the history
Closes #1986

See merge request main/Sumatra!1873

sumatra-commit: ed714eac137c88d1d7571f99d3c7a45a6869423e
  • Loading branch information
g3force authored and TIGERs GitLab committed Sep 10, 2024
1 parent a28f5dd commit 2edac18
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ public class Hysteresis

private boolean upper = false;

private Runnable onUpperCallback = () -> {};
private Runnable onLowerCallback = () -> {};
private Runnable onUpperCallback = () -> {
};
private Runnable onLowerCallback = () -> {
};


/**
Expand Down Expand Up @@ -54,7 +56,7 @@ public Hysteresis initiallyInUpperState()
/**
* @param value
*/
public void update(final double value)
public Hysteresis update(final double value)
{
boolean lower = !upper;
if (lower && (value > upperThreshold))
Expand All @@ -67,6 +69,7 @@ public void update(final double value)
upper = false;
onLowerCallback.run();
}
return this;
}


Expand Down

0 comments on commit 2edac18

Please sign in to comment.