Miflora fingerprinting (#781)
This commit is contained in:
parent
2106d591af
commit
0fabfcdd65
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define ITAG_TX (-10)
|
||||
|
||||
#define NUT_TX (-12)
|
||||
#define FLORA_TX (-10)
|
||||
|
||||
#define EDDYSTONE_ADD_1M (-41)
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue