Always show a value for temperature
This commit is contained in:
parent
c530de28d6
commit
cc0c6424f2
|
@ -106,10 +106,12 @@ class SystemStatus:
|
||||||
adjusted = max(0, temp - MIN_TEMP)
|
adjusted = max(0, temp - MIN_TEMP)
|
||||||
percent = min(1, adjusted / (MAX_TEMP - MIN_TEMP))
|
percent = min(1, adjusted / (MAX_TEMP - MIN_TEMP))
|
||||||
|
|
||||||
return round(self.height * percent)
|
return max(1, round(self.height * percent))
|
||||||
|
|
||||||
def getCpuValue(self):
|
def getCpuValue(self):
|
||||||
return round(self.height * (psutil.cpu_percent() / 100))
|
percent = psutil.cpu_percent() / 100
|
||||||
|
|
||||||
|
return round(self.height * percent)
|
||||||
|
|
||||||
def getNetworkValue(self):
|
def getNetworkValue(self):
|
||||||
connections = psutil.net_connections(kind='inet')
|
connections = psutil.net_connections(kind='inet')
|
||||||
|
|
Loading…
Reference in New Issue