mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[commands] Add C++ Requirements struct (#5504)
This commit is contained in:
@@ -8,15 +8,7 @@ using namespace frc2;
|
||||
|
||||
StartEndCommand::StartEndCommand(std::function<void()> onInit,
|
||||
std::function<void()> onEnd,
|
||||
std::initializer_list<Subsystem*> requirements)
|
||||
: CommandHelper(
|
||||
std::move(onInit), [] {},
|
||||
[onEnd = std::move(onEnd)](bool interrupted) { onEnd(); },
|
||||
[] { return false; }, requirements) {}
|
||||
|
||||
StartEndCommand::StartEndCommand(std::function<void()> onInit,
|
||||
std::function<void()> onEnd,
|
||||
std::span<Subsystem* const> requirements)
|
||||
Requirements requirements)
|
||||
: CommandHelper(
|
||||
std::move(onInit), [] {},
|
||||
[onEnd = std::move(onEnd)](bool interrupted) { onEnd(); },
|
||||
|
||||
Reference in New Issue
Block a user