From c3aeaf040e04ffb39de1fcafa925144ce325637a Mon Sep 17 00:00:00 2001 From: deadprogram Date: Wed, 9 Sep 2020 18:21:48 +0200 Subject: [PATCH] nrf528xx: correct returned MAC address in struct with global scan result Signed-off-by: deadprogram --- adapter_nrf528xx.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adapter_nrf528xx.go b/adapter_nrf528xx.go index c7a8602..edbbfd9 100644 --- a/adapter_nrf528xx.go +++ b/adapter_nrf528xx.go @@ -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