mirror of
https://github.com/adafruit/Adafruit_TSL2561.git
synced 2025-07-30 00:47:16 +02:00
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 */
|
||||
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;
|
||||
|
Reference in New Issue
Block a user