From fe6901d35f478bae78420ca167ecea96b3905bf1 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 3 Oct 2023 17:42:31 +0800 Subject: [PATCH] Patch to avoid floating point error of temperature A more complete system of dealing with floating point imprecision on the way. --- pytec/tec_qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index acd93e3..91299a4 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -792,7 +792,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.params[channel].child("PID Config", "Ki").setValue(settings["parameters"]["ki"]) self.params[channel].child("PID Config", "Kd").setValue(settings["parameters"]["kd"]) self.params[channel].child("Output Config", "Control Method", "Set Temperature").setValue(settings["target"]) - self.channel_graphs[channel].t_line.setValue(settings["target"]) + self.channel_graphs[channel].t_line.setValue(round(settings["target"], 6)) @pyqtSlot(list) def update_report(self, report_data):