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

Replaced not equal operator for double values to qFuzzyCompare #8555

Merged

Conversation

alexeylysenko
Copy link
Contributor

Using != operator is not a way to go for comparing double values. Moreover, qFuzzyCompare is already widely used in the file, so the fix would be good for keeping consistency too.

@alexeylysenko
Copy link
Contributor Author

@DonLakeFlyer Does it make sense?

@DonLakeFlyer
Copy link
Contributor

Yes and no. The reason being is that gimbal yaw is a user entered value. A fuzzy compare tends to important when real numbers are being put through some sort of calculation. And then the outputs of those calculations are compared. Also the gimbal yaw values the user can enter are limited to no decimal places. So theoretically this makes some amount of sense, but in reality it doesn't matter. The largest agrument is around consistency, which I do agree with.

@DonLakeFlyer DonLakeFlyer merged commit fa23915 into mavlink:master Mar 15, 2020
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