fix thread locking when reading temeprature

This commit is contained in:
2026-07-11 22:18:08 +02:00
parent 5338304ee8
commit d6da2f2bda
3 changed files with 63 additions and 17 deletions
+7 -13
View File
@@ -33,23 +33,17 @@ class TemperatureResult(Resultable, Drawable):
self.ylabel = "Temperature (C)"
# Initialize data lists
self.x = [] if x is None else x
self.y = [] if y is None else y
self.setpoint = [] if setpoint is None else setpoint
if (x is None) and (y is None) and (desc is None) and (job_id is None) and (job_date is None):
# Empty initialization - will be filled later
self.x = []
self.y = []
elif (x is not None) and (y is not None) and (desc is not None) and (job_id is not None) and (job_date is not None):
# Full initialization
self.x = x
self.y = y
# Set metadata if provided
if desc is not None:
self.description = desc
if job_id is not None:
self.job_id = job_id
if job_date is not None:
self.job_date = job_date
else:
raise ValueError("Wrong usage of __init__!")
def get_number_of_channels(self):
"""Returns 1 for temperature data."""