From b353916188e2edd5188475ffb64af286d0b47def Mon Sep 17 00:00:00 2001 From: atse Date: Thu, 20 Jun 2024 12:07:19 +0800 Subject: [PATCH] Put comments in right place --- pytec/tec_qt.py | 4 ++-- pytec/view/live_plot_view.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 4acd26d..7c65f08 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -213,8 +213,8 @@ class MainWindow(QtWidgets.QMainWindow): return with QSignalBlocker(self.thermostat_ctrl_menu.fan_power_slider): self.thermostat_ctrl_menu.fan_power_slider.setValue( - fan_settings["fan_pwm"] or 100 - ) # 0 = PWM off = full strength + fan_settings["fan_pwm"] or 100 # 0 = PWM off = full strength + ) with QSignalBlocker(self.thermostat_ctrl_menu.fan_auto_box): self.thermostat_ctrl_menu.fan_auto_box.setChecked(fan_settings["auto_mode"]) if not self.hw_rev_data["settings"]["fan_pwm_recommended"]: diff --git a/pytec/view/live_plot_view.py b/pytec/view/live_plot_view.py index e9ea57a..a4771fd 100644 --- a/pytec/view/live_plot_view.py +++ b/pytec/view/live_plot_view.py @@ -66,9 +66,10 @@ class _TecGraphs: self._t_line = self._t_widget.getPlotItem().addLine(label="{value} °C") self._t_line.setVisible(False) + # Hack for keeping setpoint line in plot range self._t_setpoint_plot = ( LiveLinePlot() - ) # Hack for keeping setpoint line in plot range + ) for graph in t_widget, i_widget: time_axis = LiveAxis( @@ -83,8 +84,8 @@ class _TecGraphs: # Enable linking of axes in the graph widget's context menu graph.register( - graph.getPlotItem().titleLabel.text - ) # Slight hack getting the title + graph.getPlotItem().titleLabel.text # Slight hack getting the title + ) temperature_axis = LiveAxis("left", text="Temperature", units="°C") temperature_axis.showLabel()