Skip to content

Commit 6b08161

Browse files
Elara6331deadprogram
authored andcommitted
Add Address field to Windows Device struct
1 parent 12b6f0b commit 6b08161

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: gap_windows.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ func (a *Adapter) StopScan() error {
172172

173173
// Device is a connection to a remote peripheral.
174174
type Device struct {
175+
Address Address // the MAC address of the device
176+
175177
device *bluetooth.BluetoothLEDevice
176178
session *genericattributeprofile.GattSession
177179
}
@@ -238,7 +240,7 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err
238240
return Device{}, err
239241
}
240242

241-
return Device{bleDevice, newSession}, nil
243+
return Device{address, bleDevice, newSession}, nil
242244
}
243245

244246
// Disconnect from the BLE device. This method is non-blocking and does not

0 commit comments

Comments
 (0)