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

The getTempCByIndex function doesn't check getAddress return value #8

Closed
JoakimSoderberg opened this issue Jun 7, 2013 · 1 comment

Comments

@JoakimSoderberg
Copy link
Contributor

When calling getTempCByIndex and no sensors are available on the 1-wire network (deviceCount == 0), the call to getAddress will return false. But in the code this is never checked for.

It should return DEVICE_DISCONNECTED_C message, but now I'm simply getting 0.0

https://github.com/milesburton/Arduino-Temperature-Control-Library/blob/master/DallasTemperature.cpp#L403

@milesburton
Copy link
Owner

Many thanks, merged

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

2 participants