Skip to content

Commit 6acc0fa

Browse files
jasondamingclaude
andcommitted
Address remaining 13 PR comments on Commands v3 outline
This commit addresses the remaining 13 comments (beyond the initial 30) on PR #3166. ## binding-commands-to-triggers.rst (2 comments) - Removed "How v3 triggers compare to v2 triggers" (migration guide content) - Added note about potential updates from allwpilib PR #8366 ## advanced-topics.rst (4 comments) - Removed "Dynamic Command Generation" section entirely - Removed "Resource pooling and management" from Advanced Async Patterns - Changed "Priority conflicts and circular dependencies" to just "Priority conflicts" - Removed "Memory leaks and resource exhaustion" from Edge Cases ## command-compositions.rst (2 comments) - Removed "How v3 compositions compare to v2 command groups" (migration guide content) - Added detailed explanation of parallel group implementation: - All groups (parallel/race/deadline) are parallel groups with different configs - Parallel groups have _n_ required and _m_ optional commands - Traditional parallel: _m_ = 0, Race: _n_ = 0, Deadline: both nonzero ## commands-and-coroutines.rst (5 comments) - Changed "generator/yield paradigm" to "yield paradigm" (commands are void-returning) - Removed "Comparison to v2's initialize/execute/end/isFinished pattern" - Added compiler plugin note: checks for `yield` in while-loops only - Added compiler plugin note: checks for unreachable code after `park()` - Removed "Where properties should be set" from Command Properties (overlaps with creation patterns) - Removed "How lifecycle differs from v2 commands" from Command Lifecycle 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 4cd3348 commit 6acc0fa

File tree

4 files changed

+13
-24
lines changed

4 files changed

+13
-24
lines changed

source/docs/software/commandbased/commands-v3/advanced-topics.rst

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,6 @@
1414
- Best practices for base class design
1515
- Examples of useful base class patterns (describe scenarios, not full implementations)
1616

17-
## Dynamic Command Generation
18-
19-
.. todo::
20-
Explain patterns for generating commands dynamically at runtime. Cover:
21-
- When dynamic command generation is needed
22-
- Creating commands from parameters/configuration
23-
- Path planning and generated trajectories as commands
24-
- Loading command sequences from files or network
25-
- Command builders and fluent APIs
26-
- Performance considerations for dynamic generation
27-
- Memory management for dynamically created commands
28-
- Examples of dynamic generation scenarios
29-
3017
## Performance Optimization
3118

3219
.. todo::
@@ -48,7 +35,6 @@
4835
- State machines implemented with async/await
4936
- Error handling and recovery with async commands
5037
- Cancellation and timeout patterns
51-
- Resource pooling and management
5238
- Coordinating multiple mechanisms with complex dependencies
5339
- Real-time responsive commands with background processing
5440
- Describe complex scenarios and how to implement them with v3 features
@@ -60,11 +46,10 @@
6046
- Commands that never yield (infinite loops without yield)
6147
- Forked commands and lifecycle management
6248
- Nested trigger scopes and cleanup
63-
- Priority conflicts and circular dependencies
49+
- Priority conflicts
6450
- Requirements conflicts with complex command compositions
6551
- Thread safety considerations (if any)
6652
- Limitations of the coroutine model
6753
- Breaking scheduler assumptions
68-
- Memory leaks and resource exhaustion
6954
- Common mistakes and how to avoid them
7055
- What NOT to do in v3 commands

source/docs/software/commandbased/commands-v3/binding-commands-to-triggers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
- When trigger bindings are evaluated by the scheduler
1313
- Available trigger sources (buttons, joysticks, sensors, custom)
1414
- High-level syntax for creating and binding triggers
15-
- How v3 triggers compare to v2 triggers
1615

1716
## Button Bindings
1817

@@ -49,6 +48,7 @@
4948
- Edge detection (rising/falling edges)
5049
- Trigger filtering and transformation
5150
- When composition is evaluated
51+
- Note: This section may need updates if https://github.com/wpilibsuite/allwpilib/pull/8366 is merged
5252
- Examples of trigger composition patterns (describe what examples should show)
5353

5454
## Inner Trigger Scopes

source/docs/software/commandbased/commands-v3/command-compositions.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
- How compositions differ from async/await patterns
1212
- When to use compositions vs. async/await
1313
- Available composition types in v3
14-
- How v3 compositions compare to v2 command groups
1514
- General syntax and usage patterns
1615

1716
## Sequence Groups
@@ -33,7 +32,13 @@
3332
Explain parallel command groups in detail. Cover:
3433
- What parallel groups do: run multiple commands simultaneously
3534
- How to create a parallel group
36-
- When the parallel group completes (all commands finish)
35+
- Note: All composition groups (parallel, race, deadline) are implemented as parallel groups with different configurations:
36+
- Parallel groups have _n_ required commands and _m_ optional commands
37+
- The group exits once all _n_ required commands have exited
38+
- "Traditional" parallel groups: _m_ = 0 (every command is required)
39+
- Race groups: _n_ = 0 (every command is optional, exits when any finishes)
40+
- Deadline groups: both _n_ and _m_ are nonzero (mix of required and optional)
41+
- Note: v2 deadlines were special case where _n_ = 1 and _m_ ≥ 1; v3 deadlines are generalized
3742
- Requirements handling with overlapping requirements
3843
- What happens if one command is interrupted
3944
- Common use cases for parallel groups

source/docs/software/commandbased/commands-v3/commands-and-coroutines.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
Provide an overview of what coroutines are and how v3 uses them. Cover:
2222
- High-level explanation of coroutines for teams unfamiliar with the concept
2323
- How coroutines enable sequential command logic without state machines
24-
- The generator/yield paradigm
24+
- The yield paradigm
2525
- How the scheduler executes coroutine commands
26-
- Comparison to v2's initialize/execute/end/isFinished pattern
2726
- Benefits of the coroutine approach
2827

2928
## yield()
@@ -34,6 +33,7 @@
3433
- When to use yield() vs. other control flow primitives
3534
- How yield() relates to the scheduler loop timing
3635
- Common patterns using yield() (e.g., running for multiple cycles)
36+
- Note: The compiler plugin checks for `yield` in while-loops (this check does not apply to other loop types)
3737
- Performance implications
3838
- Examples of yield() usage patterns (describe what examples should show)
3939

@@ -44,6 +44,7 @@
4444
- What park() does: pause indefinitely until command is interrupted
4545
- When to use park() (e.g., commands that should run until interrupted)
4646
- How park() differs from yield() in a loop
47+
- Note: The compiler plugin checks for unreachable code after a `park()` call
4748
- Interaction with command interruption and priorities
4849
- Common use cases for park()
4950
- Examples of park() usage patterns (describe what examples should show)
@@ -70,15 +71,13 @@
7071
- What happens when a command completes normally
7172
- What happens when a command is interrupted
7273
- Cleanup and resource management
73-
- How lifecycle differs from v2 commands
7474

7575
## Command Properties
7676

7777
.. todo::
7878
Explain the various properties that can be set on commands. Cover:
79-
- How to set command properties (method chaining, decorators, etc.)
8079
- Available properties: name, priority, interruptible, runsWhenDisabled, etc.
80+
- How to set command properties (method chaining, decorators, etc.)
8181
- When properties are evaluated vs. applied
8282
- How properties affect scheduler behavior
8383
- Best practices for setting properties
84-
- Where properties should be set (factory vs. call site)

0 commit comments

Comments
 (0)