LiquidGUI [1.0.1.2]
- Error handling and app termination for no compatible coolers. - Minor code refactoring.
This commit is contained in:
+15
-10
@@ -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
|
||||
Reference in New Issue
Block a user