forked from M-Labs/thermostat
QVariantList -> list & QVariantMap -> dict
This commit is contained in:
parent
1035978ce4
commit
085e3a5fd3
pytec/pytec/gui/view
@ -165,7 +165,7 @@ class CtrlPanel(QObject):
|
|||||||
auto_tuner_param = inner_param.opts["pid_autotune"]
|
auto_tuner_param = inner_param.opts["pid_autotune"]
|
||||||
self.autotuners.set_params(auto_tuner_param, ch, new_value)
|
self.autotuners.set_params(auto_tuner_param, ch, new_value)
|
||||||
|
|
||||||
@pyqtSlot("QVariantList")
|
@pyqtSlot(list)
|
||||||
def update_pid(self, pid_settings):
|
def update_pid(self, pid_settings):
|
||||||
for settings in pid_settings:
|
for settings in pid_settings:
|
||||||
channel = settings["channel"]
|
channel = settings["channel"]
|
||||||
@ -189,7 +189,7 @@ class CtrlPanel(QObject):
|
|||||||
"Output Config", "Control Method", "Set Temperature"
|
"Output Config", "Control Method", "Set Temperature"
|
||||||
).setValue(settings["target"])
|
).setValue(settings["target"])
|
||||||
|
|
||||||
@pyqtSlot("QVariantList")
|
@pyqtSlot(list)
|
||||||
def update_report(self, report_data):
|
def update_report(self, report_data):
|
||||||
for settings in report_data:
|
for settings in report_data:
|
||||||
channel = settings["channel"]
|
channel = settings["channel"]
|
||||||
@ -209,7 +209,7 @@ class CtrlPanel(QObject):
|
|||||||
settings["tec_i"] * 1000
|
settings["tec_i"] * 1000
|
||||||
)
|
)
|
||||||
|
|
||||||
@pyqtSlot("QVariantList")
|
@pyqtSlot(list)
|
||||||
def update_thermistor(self, sh_data):
|
def update_thermistor(self, sh_data):
|
||||||
for sh_param in sh_data:
|
for sh_param in sh_data:
|
||||||
channel = sh_param["channel"]
|
channel = sh_param["channel"]
|
||||||
@ -224,7 +224,7 @@ class CtrlPanel(QObject):
|
|||||||
sh_param["params"]["b"]
|
sh_param["params"]["b"]
|
||||||
)
|
)
|
||||||
|
|
||||||
@pyqtSlot("QVariantList")
|
@pyqtSlot(list)
|
||||||
def update_pwm(self, pwm_data):
|
def update_pwm(self, pwm_data):
|
||||||
for pwm_params in pwm_data:
|
for pwm_params in pwm_data:
|
||||||
channel = pwm_params["channel"]
|
channel = pwm_params["channel"]
|
||||||
@ -239,7 +239,7 @@ class CtrlPanel(QObject):
|
|||||||
"Output Config", "Limits", "Max Heating Current"
|
"Output Config", "Limits", "Max Heating Current"
|
||||||
).setValue(pwm_params["max_i_neg"]["value"] * 1000)
|
).setValue(pwm_params["max_i_neg"]["value"] * 1000)
|
||||||
|
|
||||||
@pyqtSlot("QVariantList")
|
@pyqtSlot(list)
|
||||||
def update_postfilter(self, postfilter_data):
|
def update_postfilter(self, postfilter_data):
|
||||||
for postfilter_params in postfilter_data:
|
for postfilter_params in postfilter_data:
|
||||||
channel = postfilter_params["channel"]
|
channel = postfilter_params["channel"]
|
||||||
|
@ -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"])
|
||||||
|
@ -10,7 +10,7 @@ class ZeroLimitsWarningView(QObject):
|
|||||||
self._lbl = limit_warning
|
self._lbl = limit_warning
|
||||||
self._style = style
|
self._style = style
|
||||||
|
|
||||||
@pyqtSlot("QVariantList")
|
@pyqtSlot(list)
|
||||||
def set_limits_warning(self, pwm_data: list):
|
def set_limits_warning(self, pwm_data: list):
|
||||||
channels_zeroed_limits = [set() for i in range(self._thermostat.NUM_CHANNELS)]
|
channels_zeroed_limits = [set() for i in range(self._thermostat.NUM_CHANNELS)]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user