mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
feat: hide the fan controls if the fan cannot be controlled (hackintosh)
This commit is contained in:
@@ -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"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user