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

Review the CorrectFactor #788

Open
1 task
jabrena opened this issue Jan 8, 2021 · 0 comments
Open
1 task

Review the CorrectFactor #788

jabrena opened this issue Jan 8, 2021 · 0 comments
Assignees
Milestone

Comments

@jabrena
Copy link
Member

jabrena commented Jan 8, 2021

Reviewing the GenericMode, I made few questions:

  • Is it necessary the CorrectFactor?
  • Is it necessary to return 0?

https://github.com/ev3dev-lang-java/ev3dev-lang-java/blob/master/src/main/java/ev3dev/sensors/GenericMode.java

            reading *= correctFactor;
            if (reading < correctMin) {
                reading = 0;
            } else if (reading >= correctMax) {
                reading = Float.POSITIVE_INFINITY;
            }
  • Review consumers and the effect to remove correctFactor & return reading = Float.NEGATIVE_INFINITY
@jabrena jabrena added this to the v1.0.0 milestone Jan 8, 2021
@jabrena jabrena self-assigned this Jan 8, 2021
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

No branches or pull requests

1 participant