mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 14:57:16 +00:00
Update to iBeacon to use only MAC to recognise different beacons - this brings it into line with common use.
A further update would be nice to display major & minor in the web ui, not included here.
This commit is contained in:
parent
1a2addfc16
commit
970f4652f5
@ -337,7 +337,7 @@ uint32_t ibeacon_add(struct IBEACON *ib) {
|
||||
if (!strncmp(ib->MAC,"FFFF",4) || strncmp(ib->FACID,"00000000",8)) {
|
||||
for (uint32_t cnt=0;cnt<MAX_IBEACONS;cnt++) {
|
||||
if (ibeacons[cnt].FLAGS) {
|
||||
if (!strncmp_P(ib->UID,PSTR("00000000000000000000000000000000"),32)) {
|
||||
// if (!strncmp_P(ib->UID,PSTR("00000000000000000000000000000000"),32)) {
|
||||
if (!strncmp(ibeacons[cnt].MAC,ib->MAC,12)) {
|
||||
// exists
|
||||
strncpy(ibeacons[cnt].NAME,ib->NAME,sizeof(ibeacons[cnt].NAME));
|
||||
@ -350,7 +350,7 @@ uint32_t ibeacon_add(struct IBEACON *ib) {
|
||||
ibeacons[cnt].count++;
|
||||
return 2;
|
||||
}
|
||||
} else {
|
||||
/* } else {
|
||||
if (!strncmp(ibeacons[cnt].UID,ib->UID,32)) {
|
||||
// exists
|
||||
strncpy(ibeacons[cnt].NAME,ib->NAME,sizeof(ibeacons[cnt].NAME));
|
||||
@ -363,7 +363,7 @@ uint32_t ibeacon_add(struct IBEACON *ib) {
|
||||
ibeacons[cnt].count++;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
for (uint32_t cnt=0;cnt<MAX_IBEACONS;cnt++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user