mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
fix: fixed BLE battery level update (wrong check) (#551)
This commit is contained in:
@@ -64,7 +64,7 @@ class BluetoothDelegate: NSObject, CBCentralManagerDelegate, CBPeripheralDelegat
|
||||
|
||||
if let idx = self.devices.firstIndex(where: { $0.uuid == cache.uuid }) {
|
||||
self.devices[idx].RSSI = rssi
|
||||
if cache.batteryLevel.isEmpty {
|
||||
if !cache.batteryLevel.isEmpty {
|
||||
self.devices[idx].batteryLevel = cache.batteryLevel
|
||||
}
|
||||
self.devices[idx].isConnected = device.isConnected()
|
||||
|
||||
Reference in New Issue
Block a user