14 #include "frc2/command/CommandBase.h"
15 #include "frc2/command/CommandGroupBase.h"
16 #include "frc2/command/CommandHelper.h"
47 template <
class T1,
class T2,
48 typename = std::enable_if_t<
49 std::is_base_of_v<Command, std::remove_reference_t<T1>>>,
50 typename = std::enable_if_t<
51 std::is_base_of_v<Command, std::remove_reference_t<T2>>>>
54 std::forward<T1>(onTrue)),
55 std::make_unique<std::remove_reference_t<T2>>(
56 std::forward<T2>(onFalse)),
67 std::unique_ptr<Command>&& onFalse,
68 std::function<
bool()> condition);
79 void End(
bool interrupted)
override;
86 std::unique_ptr<Command> m_onTrue;
87 std::unique_ptr<Command> m_onFalse;
88 std::function<bool()> m_condition;
89 Command* m_selectedCommand{
nullptr};
90 bool m_runsWhenDisabled =
true;