mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: changed value of the sensor when read is not available. Was: read unsuccessful -> do not change the value (previous is visible). Now: read unsuccessful -> 0 value. (#668)
This commit is contained in:
@@ -87,9 +87,7 @@ internal class x86_SensorsReader: SensorsReader {
|
||||
|
||||
public override func read() {
|
||||
for i in 0..<self.list.count {
|
||||
if let newValue = SMC.shared.getValue(self.list[i].key) {
|
||||
self.list[i].value = newValue
|
||||
}
|
||||
self.list[i].value = SMC.shared.getValue(self.list[i].key) ?? 0
|
||||
}
|
||||
self.callback(self.list)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user