Skip to content

Commit

Permalink
Merge branch 'after-command-factories' of https://github.com/oh-yes-0…
Browse files Browse the repository at this point in the history
…-fps/allwpilib into after-command-factories
  • Loading branch information
oh-yes-0-fps committed Sep 19, 2024
2 parents 17ae89d + dd3f9d4 commit 4e3d266
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ public ParallelRaceGroup onlyWhile(BooleanSupplier condition) {

/**
* Decorates this command to run once a condition becomes true.
*
*
* <p>Note: This decorator works by adding this command to a composition. The command the
* decorator was called on cannot be scheduled independently or be added to a different
* composition (namely, decorators), unless it is manually cleared from the list of composed
* commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition
* returned from this method can be further decorated without issue.
*
*
* @param condition the condition to wait for
* @return the decorated command
*/
Expand All @@ -238,13 +238,13 @@ public SequentialCommandGroup after(BooleanSupplier condition) {

/**
* Decorates this command to run after a time delay.
*
*
* <p>Note: This decorator works by adding this command to a composition. The command the
* decorator was called on cannot be scheduled independently or be added to a different
* composition (namely, decorators), unless it is manually cleared from the list of composed
* commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition
* returned from this method can be further decorated without issue.
*
*
* @param seconds the seconds to wait
* @return the decorated command
*/
Expand All @@ -254,13 +254,13 @@ public SequentialCommandGroup afterSeconds(double seconds) {

/**
* Decorates this command to run after a time delay.
*
*
* <p>Note: This decorator works by adding this command to a composition. The command the
* decorator was called on cannot be scheduled independently or be added to a different
* composition (namely, decorators), unless it is manually cleared from the list of composed
* commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition
* returned from this method can be further decorated without issue.
*
*
* @param time the time to wait
* @return the decorated command
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ CommandPtr Command::OnlyWhile(std::function<bool()> condition) && {
return std::move(*this).ToPtr().OnlyWhile(std::move(condition));
}

CommandPtr After(std::function<bool()> condition) && {
CommandPtr Command::After(std::function<bool()> condition) && {
return std::move(*this).ToPtr().After(std::move(condition));
}

CommandPtr AfterTime(units::second_t duration) && {
CommandPtr Command::AfterTime(units::second_t duration) && {
return std::move(*this).ToPtr().AfterTime(duration);
}

Expand Down

0 comments on commit 4e3d266

Please sign in to comment.