nrf528xx: correct returned MAC address in struct with global scan result

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2020-09-09 18:21:48 +02:00 committed by Ayke
parent a55e2194c5
commit c3aeaf040e

@ -102,8 +102,10 @@ func handleEvent() {
// callback.
scanReportBuffer.len = byte(advReport.data.len)
globalScanResult.RSSI = int16(advReport.rssi)
globalScanResult.Address.Set(advReport.peer_addr.addr)
globalScanResult.Address.SetRandom(advReport.peer_addr.bitfield_addr_type() != 0)
globalScanResult.Address = Address{
MACAddress{MAC: advReport.peer_addr.addr,
isRandom: advReport.peer_addr.bitfield_addr_type() != 0},
}
globalScanResult.AdvertisementPayload = &scanReportBuffer
// Signal to the main thread that there was a scan report.
// Scanning will be resumed (from the main thread) once the scan