Format temperature and rate LCD displays to always show 1 decimal place

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tqxrk8uj4M3w3d3eXm3xK8
This commit is contained in:
2026-06-25 22:26:06 +02:00
co-authored by Claude Sonnet 4.6
parent 0215bac13e
commit 7dd0400278
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -941,7 +941,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
submsg = msg['Soll']
if 'Temp' in submsg:
self.plot_temp_soll = submsg['Temp']
self.lcdNumber_temp_soll.display(str(submsg['Temp']))
self.lcdNumber_temp_soll.display(f'{submsg["Temp"]:.1f}')
if self.slider_temp_soll_initial_update:
# blockSignals: setValue() here is just syncing the
# slider's display to the server's current value, not
@@ -957,7 +957,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
for subkey in subsubmsg:
if "Current" in subkey:
self.plot_rate_soll = subsubmsg['Current']
self.lcdNumber_heatrate_soll.display(str(subsubmsg['Current']))
self.lcdNumber_heatrate_soll.display(f'{subsubmsg["Current"]:.1f}')
if "Set" in subkey:
if self.heatrate_soll_initial_update:
self.heatrate_soll_initial_update = False
@@ -975,11 +975,11 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
submsg = msg['Ist']
if 'Temp' in submsg:
self.plot_temp_ist = submsg['Temp']
self.lcdNumber_temp_ist.display(str(submsg['Temp']))
self.lcdNumber_temp_ist.display(f'{submsg["Temp"]:.1f}')
self._update_step_plates()
if 'Rate' in submsg:
self.plot_rate_ist = submsg['Rate']
self.lcdNumber_heatrate_ist.display(str(submsg['Rate']))
self.lcdNumber_heatrate_ist.display(f'{submsg["Rate"]:.1f}')
def on_heater_changed(self, msg):
for key in msg: