[commands] Deprecate proxy supplier constructor (#6553)

This commit is contained in:
DeltaDizzy
2024-04-29 23:11:29 -05:00
committed by GitHub
parent c71db8ea9c
commit a9cfd0d0f9
6 changed files with 51 additions and 7 deletions

View File

@@ -4,6 +4,8 @@
#include "frc2/command/Commands.h"
#include <wpi/deprecated.h>
#include "frc2/command/ConditionalCommand.h"
#include "frc2/command/DeferredCommand.h"
#include "frc2/command/FunctionalCommand.h"
@@ -60,6 +62,7 @@ CommandPtr cmd::Print(std::string_view msg) {
return PrintCommand(msg).ToPtr();
}
WPI_IGNORE_DEPRECATED
CommandPtr cmd::DeferredProxy(wpi::unique_function<Command*()> supplier) {
return ProxyCommand(std::move(supplier)).ToPtr();
}
@@ -67,6 +70,7 @@ CommandPtr cmd::DeferredProxy(wpi::unique_function<Command*()> supplier) {
CommandPtr cmd::DeferredProxy(wpi::unique_function<CommandPtr()> supplier) {
return ProxyCommand(std::move(supplier)).ToPtr();
}
WPI_UNIGNORE_DEPRECATED
CommandPtr cmd::Wait(units::second_t duration) {
return WaitCommand(duration).ToPtr();