Skip to content

Comments

[cmd] Add Commands.runStartEnd()#7931

Open
Spaceman113138 wants to merge 11 commits intowpilibsuite:mainfrom
Spaceman113138:main
Open

[cmd] Add Commands.runStartEnd()#7931
Spaceman113138 wants to merge 11 commits intowpilibsuite:mainfrom
Spaceman113138:main

Conversation

@Spaceman113138
Copy link

Adds a method like startRun or runEnd to Commands and Subsystem to make it easier to write commands that have a start, running, and end actions. I’ve seen this mentioned in a few places so I figured I might as well write it.

@Spaceman113138 Spaceman113138 requested a review from a team as a code owner April 26, 2025 12:04
@github-actions
Copy link
Contributor

This PR modifies commands. Please open a corresponding PR in Python Commands and include a link to this PR.

@github-actions github-actions bot added the component: command-based WPILib Command Based Library label Apr 26, 2025
@Spaceman113138
Copy link
Author

Perhaps writing it all on my phone was not the greatest idea

Copy link
Contributor

@KangarooKoala KangarooKoala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat feature! I've been wanting something like this for some time too. You missed a few things, but still super duper impressive for mobile!

You'll also want to fix the formatting changes, which can be done by running ./gradlew wpilibNewCommands:spotlessApply (for Java formatting) and applying the wpiformat changes (for C++ formatting).

@Spaceman113138
Copy link
Author

added the missing return in the docs and fixed the formatting so should be good now

Copy link
Contributor

@KangarooKoala KangarooKoala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I'm not an official maintainer (just another person reviewing and contributing PRs), so I unfortunately can't approve the CI run. (An official maintainer will also need to approve the PR before it gets merged.)

@calcmogul calcmogul changed the title Add runStartEnd to Commands v2 [cmd] Add Commands.runStartEnd() Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: command-based WPILib Command Based Library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants