forked from M-Labs/thermostat
Move autotune ticking connect
This commit is contained in:
parent
5862a2f7d5
commit
19470b3d02
@ -8,6 +8,9 @@ class PIDAutoTuner(QObject):
|
|||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
self._thermostat = thermostat
|
self._thermostat = thermostat
|
||||||
|
self._thermostat.report_update.connect(self.tick)
|
||||||
|
self._thermostat.interval_update.connect(self.update_sampling_interval)
|
||||||
|
|
||||||
self.autotuners = [PIDAutotune(25) for _ in range(num_of_channel)]
|
self.autotuners = [PIDAutotune(25) for _ in range(num_of_channel)]
|
||||||
self.target_temp = [20.0 for _ in range(num_of_channel)]
|
self.target_temp = [20.0 for _ in range(num_of_channel)]
|
||||||
self.test_current = [1.0 for _ in range(num_of_channel)]
|
self.test_current = [1.0 for _ in range(num_of_channel)]
|
||||||
|
@ -109,11 +109,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
self.zero_limits_warning.set_limits_warning
|
self.zero_limits_warning.set_limits_warning
|
||||||
)
|
)
|
||||||
|
|
||||||
self.thermostat.report_update.connect(self.autotuners.tick)
|
|
||||||
self.thermostat.report_update.connect(self.pid_autotune_handler)
|
self.thermostat.report_update.connect(self.pid_autotune_handler)
|
||||||
self.thermostat.interval_update.connect(
|
|
||||||
self.autotuners.update_sampling_interval
|
|
||||||
)
|
|
||||||
self.thermostat.hw_rev_update.connect(self._status)
|
self.thermostat.hw_rev_update.connect(self._status)
|
||||||
self.report_apply_btn.clicked.connect(
|
self.report_apply_btn.clicked.connect(
|
||||||
lambda: self.thermostat.set_update_s(self.report_refresh_spin.value())
|
lambda: self.thermostat.set_update_s(self.report_refresh_spin.value())
|
||||||
|
Loading…
Reference in New Issue
Block a user