WPILib Command-based example project update: feedback thread

It’s been a few years since the Command-based v2 rollout, and the standard command-based example programs are in need of updating to better reflect some of the new features that have been added and structural conventions that teams have adopted since.

Accordingly, I’ve opened a pull request to add (among a couple of other things) a new Command-based example project demonstrating modern “fluent” command definition using inline decorators.

There is also a separate pull-request that updates the WPILib documentation to reflect the structures used in this example project. The two haven’t quite been synchronized yet, but they should be broadly aligned on content.

At this point, it’d be helpful to have community feedback on these potential changes. If you’re interested, please take a look at the example project linked above and leave your feedback as a comment on this thread or on the corresponding GitHub pull request.

7 Likes

I like commands being packaged with their subsystem. I presume there is still the ability to set a dependency if a command can be used for or requires multiple subsystems.

I see the finallyDo()! Nice!

So many more methods that could use a good example.

2 Likes

Everything you could do previously, you can still do. The only additions are syntactic sugar on existing functions to reduce the amount of boilerplate (e.g. implicitly passing subsystem dependencies for commands that use only one subsystem).

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.