LiquidGUI [1.1.0.0] Dev

- Initial Linux support.
This commit is contained in:
2024-07-07 16:41:50 +01:00
parent 5fab490885
commit 495de03e39
6 changed files with 53 additions and 47 deletions
+20 -17
View File
@@ -1,11 +1,12 @@
from liquidctl import find_liquidctl_devices, cli
class LiquidCTL_Helper():
device_name = None
device_temp = 0
device_fanSpeed = 0
device_pumpSpeed = 0
device_fwVers = None
device_name = None
device_temp = 0
device_fanSpeed = 0
device_pumpSpeed = 0
device_fwVers = None
device_connect_error = False
devices = find_liquidctl_devices()
try:
@@ -14,8 +15,9 @@ class LiquidCTL_Helper():
#print(f'{dev.description}')
device_name = dev.description
device_fwVers = ''.join(map(str, dev.firmware_version))
except:
pass
except OSError:
print("ERROR: Connecting to LiquidCTL device!")
device_connect_error = True
def ForceInit(self):
init_status = self.dev.initialize()
@@ -31,16 +33,17 @@ class LiquidCTL_Helper():
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
if self.device_connect_error == False:
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
def SetFanSpeed(self, speed):
with self.dev.connect():