mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-17 20:42:47 +00:00
corrected HCI_EVENT_INQUIRY_RESULT and HCI_EVENT_INQUIRY_RESULT_WITH_RSSI handling
This commit is contained in:
parent
206a90311e
commit
1d82905555
@ -149,7 +149,7 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
|||||||
int offset = 3;
|
int offset = 3;
|
||||||
for (i=0; i<numResponses && deviceCount < MAX_DEVICES;i++){
|
for (i=0; i<numResponses && deviceCount < MAX_DEVICES;i++){
|
||||||
bt_flip_addr(addr, &packet[offset]);
|
bt_flip_addr(addr, &packet[offset]);
|
||||||
offset =+ 6;
|
offset += 6;
|
||||||
int index = getDeviceIndexForAddress(addr);
|
int index = getDeviceIndexForAddress(addr);
|
||||||
if (index >= 0) continue; // already in our list
|
if (index >= 0) continue; // already in our list
|
||||||
memcpy(devices[deviceCount].address, addr, 6);
|
memcpy(devices[deviceCount].address, addr, 6);
|
||||||
@ -169,7 +169,7 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
|||||||
devices[deviceCount].classOfDevice = READ_BT_24(packet, offset);
|
devices[deviceCount].classOfDevice = READ_BT_24(packet, offset);
|
||||||
offset += 3;
|
offset += 3;
|
||||||
devices[deviceCount].clockOffset = READ_BT_16(packet, offset) & 0x7fff;
|
devices[deviceCount].clockOffset = READ_BT_16(packet, offset) & 0x7fff;
|
||||||
offset += 2
|
offset += 2;
|
||||||
devices[deviceCount].rssi = packet[offset];
|
devices[deviceCount].rssi = packet[offset];
|
||||||
offset += 1;
|
offset += 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user