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

Some quality of life changes around invalid parameters #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rianhunter
Copy link
Contributor

center_offset doesn't really make sense for negative values or values larger than 63, so we add a hard boundary to them. Also add some warnings on the console if the user passes in an invalid value.

The center_offset parameter doesn't work for values larger than 63 and
it definitely does not work for negative values (negative values would
cause overflow into the other bitfields of the
MO_AGC_SYNC_TIP3). Bound the parameter similar to how we add bounds to
the level parameter.
Also make sure the default value listed documented in the README.md is
consistent with what is in the source code.
We also factor out bounding routine to minimize redundancy.
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.

1 participant