[cmd3] Ability to disable requirement inheritance in command builders#8880
Draft
EdanThomton wants to merge 3 commits into
Draft
[cmd3] Ability to disable requirement inheritance in command builders#8880EdanThomton wants to merge 3 commits into
EdanThomton wants to merge 3 commits into
Conversation
- Added ability to disable subcommand requirement inheriting in Parallel and Sequential command groups - Added ability to add additional mechanism requirements in Parallel and Sequential command groups
If a requirement isn't a subcommand requirement, it leads to an unneeded mechanism being uncommanded. To fix this, additional requirements are checked and only added if they are a subcommand requirement
Contributor
Author
|
From some discussion on the discord, I'd also like to bring up potentially switching the default behavior of the command builders to not inheriting requirements. Generally, the behavior expected by the user is that these commands will run their subcommands as specified without affecting any mechanisms used. Inheriting requirements breaks this, can lead to uncommanded behavior in mechanisms, and actively encourages spam of ProxyCommand in v2. Generally, having inherited requirements is a more niche behavior and need. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #8777. This adds the ability to (optionally) explicitly enable/disable requirement inheritance in Sequential and Parallel command builders. To allow for scenarios where one mechanism needs to remain commanded throughout the entire sequence, I've also added an ability to add additional requirements in the builder if requirement inheritance is disabled, so long as the additional requirements were all originally inherited.
Syntax:
Known TODO: Tests need to be added. Unfortunately, I don't have the storage space to fully build wpilib right now, so someone else may need to do that.