LiquidGUI [1.0.1.2]

- Error handling and app termination for no compatible coolers.
- Minor code refactoring.
This commit is contained in:
2023-08-18 21:37:59 +01:00
parent 9e38120cfb
commit 7b32a214df
3 changed files with 35 additions and 15 deletions
+15 -10
View File
@@ -13,20 +13,25 @@ class LiquidCTL_Init():
#print(f'{dev.description}')
device_name = dev.description
init_status = dev.initialize()
if init_status:
for key, value, unit in init_status:
#print(f'- {key}: {value} {unit}')
device_fwVers = value
def TestConnectionState(self):
if self.device_name != None:
return False
else:
return True
def Update(self):
with self.dev.connect():
status = self.dev.get_status()
for key, value, unit in status:
#print(f'- {key}: {value} {unit}')
if key == "Liquid temperature":
self.device_temp = value
elif key == "Fan speed":
self.device_fanSpeed = value
elif key == "Pump speed":
self.device_pumpSpeed = value
status = self.dev.get_status()
for key, value, unit in status:
#print(f'- {key}: {value} {unit}')
if key == "Liquid temperature":
self.device_temp = value
elif key == "Fan speed":
self.device_fanSpeed = value
elif key == "Pump speed":
self.device_pumpSpeed = value