LiquidGUI [1.0.1.3] Bugfix Release
- Moved device init into dedicated function to prevent unwanted device re-init. - Library renaming.
This commit is contained in:
@@ -18,8 +18,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.lctl = lctl
|
self.lctl = lctl
|
||||||
|
|
||||||
# Widgets ##########################################
|
# Widgets ##########################################
|
||||||
self.lbl_device_name = QLabel(font=QFont("Calibri", 16, weight=QFont.Weight.Bold),
|
self.lbl_device_name = QLabel(font=QFont("Calibri", 16, weight=QFont.Weight.Bold))
|
||||||
alignment=Qt.AlignmentFlag.AlignCenter)
|
|
||||||
self.lbl_temp = QLabel("Liquid Temperature:")
|
self.lbl_temp = QLabel("Liquid Temperature:")
|
||||||
self.prg_temp = QProgressBar(format="%v°C",
|
self.prg_temp = QProgressBar(format="%v°C",
|
||||||
minimum=0,
|
minimum=0,
|
||||||
@@ -32,11 +31,8 @@ class MainWindow(QMainWindow):
|
|||||||
self.prg_pumpSpeed = QProgressBar(format="%v rpm",
|
self.prg_pumpSpeed = QProgressBar(format="%v rpm",
|
||||||
minimum=1900,
|
minimum=1900,
|
||||||
maximum=2700)
|
maximum=2700)
|
||||||
self.btn_maxFanSpeed = QPushButton(text="Max Fan Speed")
|
|
||||||
self.btn_maxFanSpeed.clicked.connect(self.max_fan_speed)
|
|
||||||
self.lbl_fwVers = QLabel(alignment=Qt.AlignmentFlag.AlignRight)
|
self.lbl_fwVers = QLabel(alignment=Qt.AlignmentFlag.AlignRight)
|
||||||
|
|
||||||
|
|
||||||
# Layout ##########################################
|
# Layout ##########################################
|
||||||
widget = QWidget(self)
|
widget = QWidget(self)
|
||||||
layout = QVBoxLayout(widget)
|
layout = QVBoxLayout(widget)
|
||||||
@@ -48,7 +44,6 @@ class MainWindow(QMainWindow):
|
|||||||
layout.addWidget(self.lbl_pumpSpeed)
|
layout.addWidget(self.lbl_pumpSpeed)
|
||||||
layout.addWidget(self.prg_pumpSpeed)
|
layout.addWidget(self.prg_pumpSpeed)
|
||||||
layout.addWidget(self.lbl_fwVers)
|
layout.addWidget(self.lbl_fwVers)
|
||||||
layout.addWidget(self.btn_maxFanSpeed)
|
|
||||||
layout.setSpacing(10)
|
layout.setSpacing(10)
|
||||||
|
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
@@ -72,10 +67,6 @@ class MainWindow(QMainWindow):
|
|||||||
if self.lctl.device_fwVers != None:
|
if self.lctl.device_fwVers != None:
|
||||||
self.lbl_fwVers.setText(f"Firmware: v{self.lctl.device_fwVers}")
|
self.lbl_fwVers.setText(f"Firmware: v{self.lctl.device_fwVers}")
|
||||||
|
|
||||||
def max_fan_speed(self):
|
|
||||||
self.lctl.SetFanSpeed(100)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
icon = QIcon(":/icons/LiquidGUI.ico")
|
icon = QIcon(":/icons/LiquidGUI.ico")
|
||||||
|
|||||||
Reference in New Issue
Block a user