mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -41,12 +41,11 @@ class ProxyCommand : public CommandHelper<Command, ProxyCommand> {
|
||||
* confusing and opens potential footguns for users who do not fully
|
||||
* understand the semantics and implications of proxying, but who simply want
|
||||
* runtime construction. Users who do know what they are doing and need a
|
||||
* supplier-constructed proxied command should instead proxy a DeferredCommand
|
||||
* using the <code>AsProxy</code> decorator.
|
||||
* supplier-constructed proxied command should instead defer a proxy command.
|
||||
* @see DeferredCommand
|
||||
*/
|
||||
WPI_IGNORE_DEPRECATED
|
||||
[[deprecated("Proxy a DeferredCommand instead")]]
|
||||
[[deprecated("Defer a proxy command instead.")]]
|
||||
explicit ProxyCommand(wpi::unique_function<Command*()> supplier);
|
||||
|
||||
/**
|
||||
@@ -62,11 +61,10 @@ class ProxyCommand : public CommandHelper<Command, ProxyCommand> {
|
||||
* confusing and opens potential footguns for users who do not fully
|
||||
* understand the semantics and implications of proxying, but who simply want
|
||||
* runtime construction. Users who do know what they are doing and need a
|
||||
* supplier-constructed proxied command should instead proxy a DeferredCommand
|
||||
* using the <code>AsProxy</code> decorator.
|
||||
* supplier-constructed proxied command should instead defer a proxy command.
|
||||
* @see DeferredCommand
|
||||
*/
|
||||
[[deprecated("Proxy a DeferredCommand instead")]]
|
||||
[[deprecated("Defer a proxy command instead.")]]
|
||||
explicit ProxyCommand(wpi::unique_function<CommandPtr()> supplier);
|
||||
WPI_UNIGNORE_DEPRECATED
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <frc/event/EventLoop.h>
|
||||
#include <frc/filter/Debouncer.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/FunctionExtras.h>
|
||||
|
||||
#include "frc2/command/Command.h"
|
||||
#include "frc2/command/CommandScheduler.h"
|
||||
@@ -291,6 +292,13 @@ class Trigger {
|
||||
bool Get() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Adds a binding to the EventLoop.
|
||||
*
|
||||
* @param body The body of the binding to add.
|
||||
*/
|
||||
void AddBinding(wpi::unique_function<void(bool, bool)>&& body);
|
||||
|
||||
frc::EventLoop* m_loop;
|
||||
std::function<bool()> m_condition;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user