Compare commits

..

1 Commits

Author SHA1 Message Date
085e3a5fd3 QVariantList -> list & QVariantMap -> dict 2024-10-07 13:27:54 +08:00
3 changed files with 3 additions and 18 deletions

View File

@ -229,9 +229,6 @@ class CtrlPanel(QObject):
for pwm_params in pwm_data: for pwm_params in pwm_data:
channel = pwm_params["channel"] channel = pwm_params["channel"]
with QSignalBlocker(self.params[channel]): with QSignalBlocker(self.params[channel]):
self.params[channel].child(
"Output Config", "Polarity"
).setValue(pwm_params["polarity"])
self.params[channel].child( self.params[channel].child(
"Output Config", "Limits", "Max Voltage Difference" "Output Config", "Limits", "Max Voltage Difference"
).setValue(pwm_params["max_v"]["value"]) ).setValue(pwm_params["max_v"]["value"])

View File

@ -18,18 +18,6 @@
"expanded":true, "expanded":true,
"type":"group", "type":"group",
"children":[ "children":[
{
"name": "Polarity",
"type": "list",
"limits": {
"Normal": "normal",
"Reversed": "reversed"
},
"thermostat:set_param": {
"topic": "pwm",
"field": "polarity"
}
},
{ {
"name":"Control Method", "name":"Control Method",
"type":"mutex", "type":"mutex",

View File

@ -124,7 +124,7 @@ class ThermostatSettingsMenu(QtWidgets.QMenu):
self.actionAbout_Thermostat.triggered.connect(about_thermostat) self.actionAbout_Thermostat.triggered.connect(about_thermostat)
self.addAction(self.actionAbout_Thermostat) self.addAction(self.actionAbout_Thermostat)
@pyqtSlot("QVariantMap") @pyqtSlot(dict)
def fan_update(self, fan_settings): def fan_update(self, fan_settings):
logging.debug(fan_settings) logging.debug(fan_settings)
if fan_settings is None: if fan_settings is None:
@ -154,7 +154,7 @@ class ThermostatSettingsMenu(QtWidgets.QMenu):
self.fan_pwm_warning.setPixmap(QtGui.QPixmap()) self.fan_pwm_warning.setPixmap(QtGui.QPixmap())
self.fan_pwm_warning.setToolTip("") self.fan_pwm_warning.setToolTip("")
@pyqtSlot("QVariantMap") @pyqtSlot(dict)
def hw_rev(self, hw_rev): def hw_rev(self, hw_rev):
self.hw_rev_data = hw_rev self.hw_rev_data = hw_rev
self.fan_group.setEnabled(self.hw_rev_data["settings"]["fan_available"]) self.fan_group.setEnabled(self.hw_rev_data["settings"]["fan_available"])