DHTDigitalSensor.js getHeatIndex errors in npm v 2.1.0
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 494
- Forks
- 472
- PR merge metrics
- No merged PRs in 30d
Description
After installing v 2.1.0 i am getting error that h is not defined.
Looking into module sources DHTDigitalSensor.js function getHeatIndex has variable h which is not defined:
// adjustment
if (h < 13 && temp <= 112) {
heatIndex = heatIndexBase - (13 - hum) / 4 * Math.sqrt((17 - Math.abs(temp - 95)) / 17);
} else if (h > 85 && temp <= 87) {
heatIndex = heatIndexBase + ((hum - 85) / 10) * ((87 - temp) / 5)
} else {
heatIndex = heatIndexBase;
}.
I think intent was to use function parameter hum instead of h.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The error is reported in DHTDigitalSensor.js, in the getHeatIndex function shipped with npm v2.1.0. Start by checking the adjustment conditions and confirm the undefined variable reference; done means the function no longer raises the reported error and uses the intended humidity value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100