mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[commands] Add StartRun command factory (#6572)
This commit is contained in:
@@ -58,6 +58,14 @@ CommandPtr cmd::RunEnd(std::function<void()> run, std::function<void()> end,
|
||||
.ToPtr();
|
||||
}
|
||||
|
||||
CommandPtr cmd::StartRun(std::function<void()> start, std::function<void()> run,
|
||||
Requirements requirements) {
|
||||
return FunctionalCommand(
|
||||
std::move(start), std::move(run), [](bool interrupted) {},
|
||||
[] { return false; }, requirements)
|
||||
.ToPtr();
|
||||
}
|
||||
|
||||
CommandPtr cmd::Print(std::string_view msg) {
|
||||
return PrintCommand(msg).ToPtr();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user