Merge pull request #1036 from ttdennis/master

Fix BLE name assignment
This commit is contained in:
Simone Margaritelli 2023-07-25 14:33:56 +02:00 committed by GitHub
commit 32d997ea5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ func (d *BLEDevice) Name() string {
name := d.DeviceName name := d.DeviceName
if name == "" { if name == "" {
// get the name from the device // get the name from the device
name := d.Device.Name() name = d.Device.Name()
if name == "" && d.Advertisement != nil { if name == "" && d.Advertisement != nil {
// get the name from the advertisement data // get the name from the advertisement data
name = d.Advertisement.LocalName name = d.Advertisement.LocalName