mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[commands] Add C++ Requirements struct (#5504)
This commit is contained in:
@@ -22,16 +22,6 @@ namespace frc2 {
|
||||
*/
|
||||
class RunCommand : public CommandHelper<FunctionalCommand, RunCommand> {
|
||||
public:
|
||||
/**
|
||||
* Creates a new RunCommand. The Runnable will be run continuously until the
|
||||
* command ends. Does not run when disabled.
|
||||
*
|
||||
* @param toRun the Runnable to run
|
||||
* @param requirements the subsystems to require
|
||||
*/
|
||||
RunCommand(std::function<void()> toRun,
|
||||
std::initializer_list<Subsystem*> requirements);
|
||||
|
||||
/**
|
||||
* Creates a new RunCommand. The Runnable will be run continuously until the
|
||||
* command ends. Does not run when disabled.
|
||||
@@ -40,7 +30,7 @@ class RunCommand : public CommandHelper<FunctionalCommand, RunCommand> {
|
||||
* @param requirements the subsystems to require
|
||||
*/
|
||||
explicit RunCommand(std::function<void()> toRun,
|
||||
std::span<Subsystem* const> requirements = {});
|
||||
Requirements requirements = {});
|
||||
|
||||
RunCommand(RunCommand&& other) = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user