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
|
||||
|
||||
# Widgets ##########################################
|
||||
self.lbl_device_name = QLabel(font=QFont("Calibri", 16, weight=QFont.Weight.Bold),
|
||||
alignment=Qt.AlignmentFlag.AlignCenter)
|
||||
self.lbl_device_name = QLabel(font=QFont("Calibri", 16, weight=QFont.Weight.Bold))
|
||||
self.lbl_temp = QLabel("Liquid Temperature:")
|
||||
self.prg_temp = QProgressBar(format="%v°C",
|
||||
minimum=0,
|
||||
@@ -32,11 +31,8 @@ class MainWindow(QMainWindow):
|
||||
self.prg_pumpSpeed = QProgressBar(format="%v rpm",
|
||||
minimum=1900,
|
||||
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)
|
||||
|
||||
|
||||
# Layout ##########################################
|
||||
widget = QWidget(self)
|
||||
layout = QVBoxLayout(widget)
|
||||
@@ -48,7 +44,6 @@ class MainWindow(QMainWindow):
|
||||
layout.addWidget(self.lbl_pumpSpeed)
|
||||
layout.addWidget(self.prg_pumpSpeed)
|
||||
layout.addWidget(self.lbl_fwVers)
|
||||
layout.addWidget(self.btn_maxFanSpeed)
|
||||
layout.setSpacing(10)
|
||||
|
||||
self.setLayout(layout)
|
||||
@@ -71,10 +66,6 @@ class MainWindow(QMainWindow):
|
||||
self.prg_pumpSpeed.setValue(self.lctl.device_pumpSpeed)
|
||||
if self.lctl.device_fwVers != None:
|
||||
self.lbl_fwVers.setText(f"Firmware: v{self.lctl.device_fwVers}")
|
||||
|
||||
def max_fan_speed(self):
|
||||
self.lctl.SetFanSpeed(100)
|
||||
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
Reference in New Issue
Block a user