From f7a5526d5ae6bee4102a1378d068396a70efb53a Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Thu, 28 Apr 2022 20:16:09 +0200 Subject: [PATCH] feat: hide the fan controls if the fan cannot be controlled (hackintosh) --- Modules/Bluetooth/readers.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Bluetooth/readers.swift b/Modules/Bluetooth/readers.swift index 152cd293..b11f3c83 100644 --- a/Modules/Bluetooth/readers.swift +++ b/Modules/Bluetooth/readers.swift @@ -243,7 +243,7 @@ internal class DevicesReader: Reader<[BLEDevice]>, CBCentralManagerDelegate, CBP for obj in devices { var batteryLevel: [KeyValue_t] = [] - for key in ["device_batteryLevelCase", "device_batteryLevelLeft", "device_batteryLevelRight", "Left Battery Level", "Right Battery Level"] { + for key in ["device_batteryLevelCase", "device_batteryLevelLeft", "device_batteryLevelRight", "Left Battery Level", "Right Battery Level", "device_batteryLevelMain"] { if let pair = obj.value.first(where: { $0.key == key }) { batteryLevel.append(KeyValue_t(key: key, value: (pair.value as? String)?.replacingOccurrences(of: "%", with: "") ?? "-1")) }