-
Notifications
You must be signed in to change notification settings - Fork 273
Fix farenheit conversion #51
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
Fix farenheit conversion #51
Conversation
When temperature in C was below 0, the conversion to F was wrong due to treating the C value as unsigned integer instead of signed integer. See http://bit.ly/3ckRfxp for more information. Thanks to hoggin for reporting this problem.
Yveaux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! You could also use auto instead of int or include it in the return statement to leave the type up to the compiler
|
Hi. This isn't working for me. Any ideas? |
|
@my-bam could you be a bit more specific? What version of MySensors are you using? |
3.2.---------------------------------------------------------------------------------------------- |
When temperature in C was below 0, the conversion to F was wrong due to
treating the C value as unsigned integer instead of signed integer.
See http://bit.ly/3ckRfxp for more information.
Thanks to hoggin for reporting this problem.