Skip to content

Commit 99e9d0f

Browse files
committed
Reorganize command-based documentation for v2/v3 separation
Move all Commands v2 documentation files into a commands-v2/ subdirectory to prepare for Commands v3 documentation. This is Phase 1 of the Commands v3 documentation project. Changes: - Move 12 v2 documentation files to commands-v2/ subdirectory (preserving git history) - Create new commands-v2/index.rst as landing page for v2 docs - Update main commandbased/index.rst to serve as high-level framework chooser - Update 20 files with corrected cross-references to new v2 locations - Add 12 redirects to ensure old URLs continue working This reorganization addresses feedback on PR #3095 to split the work into manageable phases. The next phase will add v3 documentation structure with TODO placeholders. Related to #3095
1 parent 4117fc9 commit 99e9d0f

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

source/docs/software/commandbased/commands-v2/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This sequence of articles serves as an introduction to and reference for the WPI
44

55
Commands v2 is the stable, production-ready command-based framework that supports Java, C++, and Python. It uses a declarative programming style with method chaining and lambda expressions to compose robot behaviors.
66

7+
.. note:: Commands v2 will continue to be supported and maintained. Java teams may also consider :ref:`docs/software/commandbased/commands-v3/index:Commands v3 Programming`, which offers an imperative programming style with coroutines.
8+
79
For a collection of example projects using Commands v2, see :ref:`docs/software/examples-tutorials/wpilib-examples:Command-Based Examples`.
810

911
.. toctree::

source/docs/software/commandbased/index.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,34 @@
22

33
This section serves as an introduction to and reference for the WPILib command-based framework.
44

5+
WPILib offers two command-based frameworks:
6+
7+
- **Commands v2**: The stable, production-ready framework supporting Java, C++, and Python. Uses a declarative programming style with method chaining and lambda expressions.
8+
- **Commands v3**: A newer Java-only framework offering an imperative programming style with coroutines. Currently in development with enhanced features.
9+
10+
.. note:: Most teams should use **Commands v2**, which is battle-tested and supports all WPILib languages. Java teams interested in coroutine-based imperative programming may explore Commands v3.
11+
512
For a collection of example projects using the command-based framework, see :ref:`docs/software/examples-tutorials/wpilib-examples:Command-Based Examples`.
613

714
.. toctree::
815
:maxdepth: 1
16+
:caption: Command-Based Frameworks
917

1018
commands-v2/index
19+
commands-v3/index
20+
21+
## Choosing Between v2 and v3
22+
23+
### Use Commands v2 if
24+
25+
- You need C++ or Python support
26+
- You want the most stable and widely-used framework
27+
- Your team is comfortable with declarative/functional programming
28+
- You're new to command-based programming
29+
30+
### Use Commands v3 if
31+
32+
- You're a Java team
33+
- You prefer imperative control flow (loops, if-statements) over method chaining
34+
- You want to use the actively developed framework with new features
35+
- You're comfortable with more advanced programming concepts

0 commit comments

Comments
 (0)