Skip to content

Commit

Permalink
Add requirements parameter to Commands.idle()
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Oct 17, 2023
1 parent da70e4c commit c32fe5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static Command none() {
*
* @return the command
*/
public static Command idle() {
return run(() -> {});
public static Command idle(Subsystem... subsystems) {
return run(() -> {}, subsystems);
}

// Action Commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ CommandPtr cmd::None() {
return InstantCommand().ToPtr();
}

CommandPtr cmd::Idle() {
return Run([] {});
CommandPtr cmd::Idle(Requirements requirements) {
return Run([] {}, requirements);
}

CommandPtr cmd::RunOnce(std::function<void()> action,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CommandPtr None();
* @return the command
*/
[[nodiscard]]
CommandPtr Idle();
CommandPtr Idle(Requirements requirements = {});

// Action Commands

Expand Down

0 comments on commit c32fe5a

Please sign in to comment.