mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[commands] Disambiguate ProxyCommand and DeferredCommand (#6324)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "frc2/command/ProxyCommand.h"
|
||||
|
||||
#include <fmt/core.h>
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
|
||||
using namespace frc2;
|
||||
@@ -20,11 +21,11 @@ ProxyCommand::ProxyCommand(wpi::unique_function<CommandPtr()> supplier)
|
||||
|
||||
ProxyCommand::ProxyCommand(Command* command)
|
||||
: ProxyCommand([command] { return command; }) {
|
||||
SetName(std::string{"Proxy("}.append(command->GetName()).append(")"));
|
||||
SetName(fmt::format("Proxy({})", command->GetName()));
|
||||
}
|
||||
|
||||
ProxyCommand::ProxyCommand(std::unique_ptr<Command> command) {
|
||||
SetName(std::string{"Proxy("}.append(command->GetName()).append(")"));
|
||||
SetName(fmt::format("Proxy({})", command->GetName()));
|
||||
m_supplier = [command = std::move(command)] { return command.get(); };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user