Ignore annoying echo dot lost iBeacons (#571)

This commit is contained in:
Darrell 2022-08-03 19:50:22 -04:00 committed by GitHub
parent 8373e8edf8
commit 70c993dff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -391,8 +391,8 @@ void BleFingerprint::fingerprintManufactureData(NimBLEAdvertisedDevice *advertis
{
BLEBeacon oBeacon = BLEBeacon();
oBeacon.setData(strManufacturerData);
setId(Sprintf("iBeacon:%s-%u-%u", std::string(oBeacon.getProximityUUID()).c_str(), ENDIAN_CHANGE_U16(oBeacon.getMajor()), ENDIAN_CHANGE_U16(oBeacon.getMinor())), ID_TYPE_IBEACON);
calRssi = oBeacon.getSignalPower();
setId(Sprintf("iBeacon:%s-%u-%u", std::string(oBeacon.getProximityUUID()).c_str(), ENDIAN_CHANGE_U16(oBeacon.getMajor()), ENDIAN_CHANGE_U16(oBeacon.getMinor())), calRssi != 3 ? ID_TYPE_IBEACON : ID_TYPE_ECHO_LOST );
}
else if (strManufacturerData.length() >= 4 && strManufacturerData[2] == 0x10)
{

View File

@ -15,6 +15,8 @@
#define NO_RSSI (-32768)
#define ID_TYPE_TX_POW short(1)
#define ID_TYPE_ECHO_LOST short(-10)
#define ID_TYPE_MISC_APPLE short(-5)
#define ID_TYPE_MAC short(0)