mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Fix misdetection of current generation TSL2591 (#23699)
* Update xsns_11_veml6070.ino in Veml6070Detect check for the presence of both addresses in the bus to avoid misdetection of ATH20/21 (anyone with the device, please confirm this change still detect the device when present) * Update xsns_16_tsl2561.ino check the correct ID was returned to avoid misdetection of other sensors. * Update xsns_57_tsl2591.ino - report channel values in JSON as in TSL2561 Add the raw infrared and broadband channels of the sensor to the JSON report like is done in the driver for TSL2561 * Update xsns_57_tsl2591.ino Fix var name * Update xsns_57_tsl2591.ino Fix variable name * Fix to correctly detect all known chip versions Fix do deal with the current generation of the chip that returns 5 is ID
This commit is contained in:
parent
60d59fde09
commit
f106eb3324
@ -75,7 +75,8 @@ void Tsl2561Detect(void)
|
||||
if (!Tsl.id(id)) return;
|
||||
// check the correct ID was returned
|
||||
// datasheet says reg 0xA (ID) returns 0x1r (r = nibble revision)
|
||||
if ((id & 0xF0) != 0x10) return;
|
||||
// current version returns 0x5r
|
||||
if ((id & 0xF0) != 0x10 && (id & 0xF0) != 0x50) return;
|
||||
if (Tsl.on()) {
|
||||
tsl2561_type = 1;
|
||||
I2cSetActiveFound(Tsl.address(), tsl2561_types);
|
||||
|
Loading…
x
Reference in New Issue
Block a user