Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpilib] Tunable Values API #7100

Closed
wants to merge 7 commits into from

Conversation

oh-yes-0-fps
Copy link
Contributor

@oh-yes-0-fps oh-yes-0-fps commented Sep 19, 2024

This allows users to more easily fetch values that have been edited from a dashboard. This is important for quickly iterating. If people think a hasChanged method would be a good idea I can add it. If this API is liked I will implement a cpp equivalent.

@oh-yes-0-fps oh-yes-0-fps requested review from a team as code owners September 19, 2024 18:08
Copy link
Contributor

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

@oh-yes-0-fps
Copy link
Contributor Author

I accidentally branched off of my tracer branch, ignore the commit history above

@pjreiniger
Copy link
Contributor

My team has had a similar thing, backed by the persistent Preferences table in wpilib for quite some time.

Our API makes it super easy to "lock" properties so they can no longer be tunable when you are done tuning.

@oh-yes-0-fps
Copy link
Contributor Author

Persistent values are better left to the Preferences API. Persistent values can cause unintended side effects very easily if you aren't careful and I think it's important to be very explicit with their usage. I want the expectation of this API to be deterministic at bootup unless a dashboard is modifying a tunable topic.

@oh-yes-0-fps
Copy link
Contributor Author

Another goal is to prevent primitive boxing, that's why the tunable value classes don't share a common parent with a generic for the value type or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants