Add Address field to Windows Device struct

This commit is contained in:
Elara 2024-04-02 19:40:02 -07:00 committed by Ron Evans
parent 12b6f0bc25
commit 6b08161955

View file

@ -172,6 +172,8 @@ func (a *Adapter) StopScan() error {
// Device is a connection to a remote peripheral. // Device is a connection to a remote peripheral.
type Device struct { type Device struct {
Address Address // the MAC address of the device
device *bluetooth.BluetoothLEDevice device *bluetooth.BluetoothLEDevice
session *genericattributeprofile.GattSession session *genericattributeprofile.GattSession
} }
@ -238,7 +240,7 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err
return 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 // Disconnect from the BLE device. This method is non-blocking and does not