From 7a727cb011ed8c18c24d9009ada88fc6aa6ef6fe Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 31 Jul 2023 16:14:14 +0800 Subject: [PATCH] Add about thermostat window --- pytec/tec_qt.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 207f214..b394400 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -317,10 +317,38 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.menu.addAction(self.actionEnter_DFU_Mode) self.menu.addAction(self.actionNetwork_Settings) - self.menu.addAction(self.actionAbout_Thermostat) self.menu.addAction(self.actionLoad_all_configs) self.menu.addAction(self.actionSave_all_configs) + def about_thermostat(): + QtWidgets.QMessageBox.about( + self, + _translate("MainWindow","About Thermostat"), + f""" +

Sinara 8451 Thermostat v{self.hw_rev_d['rev']['major']}.{self.hw_rev_d['rev']['minor']}

+ +
+ +

Settings:

+ Default fan curve: + a = {self.hw_rev_d['settings']['fan_k_a']}, + b = {self.hw_rev_d['settings']['fan_k_b']}, + c = {self.hw_rev_d['settings']['fan_k_c']} +
+ Fan PWM range: + {self.hw_rev_d['settings']['min_fan_pwm']} – {self.hw_rev_d['settings']['max_fan_pwm']} +
+ Fan PWM frequency: {self.hw_rev_d['settings']['fan_pwm_freq_hz']} Hz +
+ Fan available: {self.hw_rev_d['settings']['fan_available']} +
+ Fan PWM recommended: {self.hw_rev_d['settings']['fan_pwm_recommended']} + """ + ) + + self.actionAbout_Thermostat.triggered.connect(about_thermostat) + self.menu.addAction(self.actionAbout_Thermostat) + self.thermostat_settings.setMenu(self.menu) self.plot_menu = QtWidgets.QMenu()