feat: ✨ Expose PID, exits, and slew to be modified #177
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.
Summary
Allows chassis settings to be modified post-construction of the chassis, all in a thread safe / atomic manner. It also adds the ability to have any number of exit conditions and configure them in a much cleaner manner.
PID gains and slew can be changed mid motion, but changing exit conditions mid motion will not take effect until the next motion runs.
Motivation
Before, an advanced user would have to edit headers to modify chassis settings after chassis construction, risking headaches due to thread-unsafety, but now it's a built-in thread-safe feature.
Also having two different exit conditions annoyed me.
Test Plan
I will not be able to test it, but ideally the following tests should be run:
Additional Notes
Needs docs / comments
If exit conditions seem to goof, then just use commit 1409044, as I doubt the exit conditions can be fixed in a timely manner.
Download the template for this pull request:
Note
This is auto generated from
Add Template to Pull Request