11#include "core/utils/command_structure/auto_command.h"
27 [[deprecated(
"Use list constructor instead. If you need to make a decision before adding new commands, use Branch "
28 "(https://github.com/RIT-VEX-U/Core/wiki/3-%7C-Utilites#commandcontroller)")]]
void
29 add(std::vector<AutoCommand *> cmds);
30 void add(AutoCommand *cmd,
double timeout_seconds = 10.0);
43 [[deprecated(
"Use list constructor instead. If you need to make a decision before adding new commands, use Branch "
44 "(https://github.com/RIT-VEX-U/Core/wiki/3-%7C-Utilites#commandcontroller)")]]
void
45 add(std::vector<AutoCommand *> cmds,
double timeout_sec);
69 std::string toString();
79 bool printPathLogs =
true;
82 std::queue<AutoCommand *> command_queue;
83 bool command_timed_out =
false;
84 std::function<bool()> should_cancel = []() {
return false; };
void add(std::vector< AutoCommand * > cmds)
Definition command_controller.cpp:28
void run()
Definition command_controller.cpp:66
bool last_command_timed_out()
Definition command_controller.cpp:128
CommandController(std::initializer_list< AutoCommand * > cmds)
Create a CommandController with commands pre added. More can be added with CommandController::add()
Definition command_controller.h:20
void add_cancel_func(std::function< bool(void)> true_if_cancel)
add_cancel_func specifies that when this func evaluates to true, to cancel the command controller
Definition command_controller.cpp:60
void add_delay(int ms)
Definition command_controller.cpp:55