Merge pull request #11629 from btsimonh/iBeaconUpdate

Update to iBeacon
This commit is contained in:
Theo Arends 2021-04-08 19:36:27 +02:00 committed by GitHub
commit 2f3a3264dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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++) {