FTCLib Commands #
FTCLib has a commands system that is similar to Road Runner actions.
Here’s a generic FTCLib command for wrapping actions.
This pretty much works with some caveats.
- Actions have no concept of requirements, so they need to be given for each command.
- Actions do not know when they’re interrupted, while commands have a chance to
do some final cleanup. Of course, a custom command wrapping one
particular action (e.g., following a trajectory) may specifically override
end()
to perform some work (e.g., stopping drive motors). - Commands don’t have a mechanism analogous to
preview()
. This means the quickstart trajectory preview will only work for the currently executing command (of course you can bundle several actions together into one composite action and wrap that).