mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[commands] Refactor ProxyScheduleCommand, SelectCommand into ProxyCommand (#4534)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <span>
|
||||
|
||||
#include <wpi/SmallVector.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
#include "frc2/command/CommandHelper.h"
|
||||
@@ -30,22 +31,14 @@ class ProxyScheduleCommand
|
||||
* initialized, and ends when they are all no longer scheduled.
|
||||
*
|
||||
* @param toSchedule the commands to schedule
|
||||
* @deprecated Replace with {@link ProxyCommand},
|
||||
* composing multiple of them in a {@link ParallelRaceGroup} if needed.
|
||||
*/
|
||||
WPI_DEPRECATED("Replace with ProxyCommand")
|
||||
explicit ProxyScheduleCommand(std::span<Command* const> toSchedule);
|
||||
|
||||
explicit ProxyScheduleCommand(Command* toSchedule);
|
||||
|
||||
/**
|
||||
* Creates a new ProxyScheduleCommand that schedules the given command when
|
||||
* initialized, and ends when it is no longer scheduled.
|
||||
*
|
||||
* <p>Note that this constructor passes ownership of the given command to the
|
||||
* returned ProxyScheduleCommand.
|
||||
*
|
||||
* @param toSchedule the command to schedule
|
||||
*/
|
||||
explicit ProxyScheduleCommand(std::unique_ptr<Command>&& toSchedule);
|
||||
|
||||
ProxyScheduleCommand(ProxyScheduleCommand&& other) = default;
|
||||
|
||||
void Initialize() override;
|
||||
|
||||
Reference in New Issue
Block a user