feat: hide the fan controls if the fan cannot be controlled (hackintosh)

This commit is contained in:
Serhiy Mytrovtsiy
2022-04-28 20:16:09 +02:00
parent 5b2a4391d4
commit f7a5526d5a

View File

@@ -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"))
}