Fix for ESP32 with Compiler Warning:All

I got this error with ESP32 
error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses]

When compiler warning is set on All, the code will not compile
This commit is contained in:
Rémi Sarrailh
2019-02-15 21:35:06 +01:00
committed by GitHub
parent 0558d76ba4
commit f37cdf8ffa

View File

@ -107,7 +107,7 @@ boolean Adafruit_TSL2561_Unified::init()
{
/* Make sure we're actually connected */
uint8_t x = read8(TSL2561_REGISTER_ID);
if (x & 0xF0 != 0x10) { // ID code for TSL2561
if ((x & 0xF0) != 0x10) { // ID code for TSL2561
return false;
}
_tsl2561Initialised = true;