Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

Update MainPage.xaml.h #505

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

voiptecben
Copy link

Have rewritten the 2 routines that return the decimal temp and humidity values from the received bitstring.

These were
double Humidity ( ) const
and
double Temperature ( ) const
in mainpagexaml.h

The math was all wrong and the program returned crazy values for both temp and humidity

Have added comments explaining the new code lines that are self explanatory.
tested and it works for DHT11- Difference for DHT22 should be that is more accurate and has decimal values

@jordanrh1
Copy link
Contributor

I verified the sample on both the DHT11 and DHT22 and the calculations were correct. I accepted a previous pull request that claimed to correct the math, but it was wrong and I had to revert the change. I'm sorry but I cannot accept this pull request without seeing the issue and fix firsthand.

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

Successfully merging this pull request may close these issues.

5 participants