-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 for #513 : checking presence of Si7021 in case HTU21D is not dete… #514
Fix for #513 : checking presence of Si7021 in case HTU21D is not dete… #514
Conversation
…HTU21D is not detected. Added include for axTLS. Si7021 is compatible with HTU21D, but it returns 0x3A instead of 0x2 on I2C command 0xE7, thats why the .begin() function failed
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.
please remove the axTLS header file. This include is done by WifiSecureClient if axTLS::WiFiClientSecure is used.
We will change to BearSSL in the next version. At the moment the resulting binary would be too large for OTA.
Numbering: please use B9 for next version and update the VERSION.md file
Well, I tried to compile the firmware without the axTLS header, but in the latest library 2.5.2 the (https://github.com/esp8266/Arduino/blob/2.5.2/libraries/ESP8266WiFi/src/WiFiClientSecure.h) the #include "WiFiClientSecureAxTLS.h" is commented out because of defaulting to BearSSL. Regarding the version string, mea culpa, correcting it now. |
Wire.beginTransmission(HTU21DF_I2CADDR); | ||
Wire.write(HTU21DF_READREG); | ||
Wire.endTransmission(); | ||
Wire.requestFrom(HTU21DF_I2CADDR, 1); |
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.
so this seems to be a ugly workaround for
https://github.com/adafruit/Adafruit_HTU21DF_Library/blob/master/Adafruit_HTU21DF.cpp#L49
wouldn't it be better to submit this as a PR to that library? then this code needs no modification and more users of that library also the ability to benefit from your bug fix.
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.
see inline comment..
@@ -3935,8 +3936,17 @@ static void powerOnTestSensors() { | |||
if (cfg::htu21d_read) { | |||
debug_outln_info(F("Read HTU21D...")); | |||
if (!htu21d.begin()) { |
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.
Another way to workaround this for now is
if(!... && htu21d.readHumidity() < 1.0f)
@zdroyer I sent an alternative PR which should address this regression you found as well. Please let me know if there are any issues with that. |
|
The PR is waiting for Adafruit acceptance: adafruit/Adafruit_HTU21DF_Library#16 |
…cted. Added include for axTLS.
Si7021 is compatible with HTU21D, but it returns 0x3A instead of 0x2 on I2C command 0xE7, thats why the .begin() function failed