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:
@@ -21,16 +21,6 @@ namespace frc2 {
|
||||
*/
|
||||
class InstantCommand : public CommandHelper<FunctionalCommand, InstantCommand> {
|
||||
public:
|
||||
/**
|
||||
* Creates a new InstantCommand that runs the given Runnable with the given
|
||||
* requirements.
|
||||
*
|
||||
* @param toRun the Runnable to run
|
||||
* @param requirements the subsystems required by this command
|
||||
*/
|
||||
InstantCommand(std::function<void()> toRun,
|
||||
std::initializer_list<Subsystem*> requirements);
|
||||
|
||||
/**
|
||||
* Creates a new InstantCommand that runs the given Runnable with the given
|
||||
* requirements.
|
||||
@@ -39,7 +29,7 @@ class InstantCommand : public CommandHelper<FunctionalCommand, InstantCommand> {
|
||||
* @param requirements the subsystems required by this command
|
||||
*/
|
||||
explicit InstantCommand(std::function<void()> toRun,
|
||||
std::span<Subsystem* const> requirements = {});
|
||||
Requirements requirements = {});
|
||||
|
||||
InstantCommand(InstantCommand&& other) = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user