forked from adafruit/Adafruit_TSL2561
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:
@ -107,7 +107,7 @@ boolean Adafruit_TSL2561_Unified::init()
|
|||||||
{
|
{
|
||||||
/* Make sure we're actually connected */
|
/* Make sure we're actually connected */
|
||||||
uint8_t x = read8(TSL2561_REGISTER_ID);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
_tsl2561Initialised = true;
|
_tsl2561Initialised = true;
|
||||||
|
Reference in New Issue
Block a user