Miflora fingerprinting (#781)

This commit is contained in:
Darrell 2023-01-01 02:46:52 -05:00 committed by GitHub
parent 2106d591af
commit 0fabfcdd65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 3 deletions

View File

@ -54,7 +54,18 @@
"utility": "cpp",
"typeinfo": "cpp",
"string": "cpp",
"set": "cpp"
"set": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"map": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"random": "cpp",
"regex": "cpp",
"string_view": "cpp",
"thread": "cpp"
}
}
}

View File

@ -226,6 +226,9 @@ void BleFingerprint::fingerprintServiceAdvertisements(NimBLEAdvertisedDevice *ad
asRssi = BleFingerprintCollection::rxRefRssi + (haveTxPower ? txPower : NUT_TX);
setId("nut:" + getMac(), ID_TYPE_NUT);
return;
} else if (uuid == miFloraUUID) {
asRssi = BleFingerprintCollection::rxRefRssi + (haveTxPower ? txPower : FLORA_TX);
setId("flora:" + getMac(), ID_TYPE_FLORA);
}
}

View File

@ -39,6 +39,7 @@
#define ID_TYPE_ITAG short(125)
#define ID_TYPE_ITRACK short(127)
#define ID_TYPE_NUT short(128)
#define ID_TYPE_FLORA short(129)
#define ID_TYPE_TRACKR short(130)
#define ID_TYPE_TILE short(135)
#define ID_TYPE_MEATER short(140)

View File

@ -13,6 +13,7 @@
#define ITAG_TX (-10)
#define NUT_TX (-12)
#define FLORA_TX (-10)
#define EDDYSTONE_ADD_1M (-41)
#endif

View File

@ -17,6 +17,7 @@ const BLEUUID tractiveUUID(0x20130001, 0x0719, 0x4b6e, 0xbe5d158ab92fa5a4);
const BLEUUID espresenseUUID(0xe5ca1ade, 0xf007, 0xba11, 0x0000000000000000);
const BLEUUID nutUUID((uint16_t)0x1803);
const BLEUUID miFloraUUID((uint16_t)0xfe95);
const BLEUUID fitbitUUID(0xadabfb00, 0x6e7d, 0x4601, 0xbda2bffaa68956ba);
@ -35,8 +36,7 @@ const BLEUUID fwRevChar(uint16_t(0x2A26));
const BLEUUID hwRevChar(uint16_t(0x2A27));
const BLEUUID manufChar(uint16_t(0x2A29));
static int median_of_3(int a, int b, int c)
{
static int median_of_3(int a, int b, int c) {
int the_max = max(max(a, b), c);
int the_min = min(min(a, b), c);
// unnecessarily clever code