From 6b08161955e320474f9753d22e3f8a9f9a0b519e Mon Sep 17 00:00:00 2001 From: Elara Date: Tue, 2 Apr 2024 19:40:02 -0700 Subject: [PATCH] Add Address field to Windows Device struct --- gap_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gap_windows.go b/gap_windows.go index 18748c0..fc92b0f 100644 --- a/gap_windows.go +++ b/gap_windows.go @@ -172,6 +172,8 @@ func (a *Adapter) StopScan() error { // Device is a connection to a remote peripheral. type Device struct { + Address Address // the MAC address of the device + device *bluetooth.BluetoothLEDevice session *genericattributeprofile.GattSession } @@ -238,7 +240,7 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err return Device{}, err } - return Device{bleDevice, newSession}, nil + return Device{address, bleDevice, newSession}, nil } // Disconnect from the BLE device. This method is non-blocking and does not