[commands] Add until() as alias for withInterrupt() (#3981)

This is a clearer description for the functionality.
Will deprecate withInterrupt next year.
This commit is contained in:
Oblarg
2022-02-04 01:14:52 -05:00
committed by GitHub
parent 16bf2c70c5
commit 6a6366b0d6
12 changed files with 50 additions and 14 deletions

View File

@@ -111,6 +111,17 @@ class Command {
*/
virtual ParallelRaceGroup WithTimeout(units::second_t duration) &&;
/**
* Decorates this command with an interrupt condition. If the specified
* condition becomes true before the command finishes normally, the command
* will be interrupted and un-scheduled. Note that this only applies to the
* command returned by this method; the calling command is not itself changed.
*
* @param condition the interrupt condition
* @return the command with the interrupt condition added
*/
virtual ParallelRaceGroup Until(std::function<bool()> condition) &&;
/**
* Decorates this command with an interrupt condition. If the specified
* condition becomes true before the command finishes normally, the command