fix: bugfix to fill data butter with value, timestamp properly

This commit is contained in:
appel_c 2024-06-03 14:40:51 +02:00
parent 33f5d8a629
commit 85208002a3
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class SimMonitorAsyncPrepare(CustomDetectorMixin):
if self.parent.scaninfo.scan_msg is None:
return
metadata = self.parent.scaninfo.scan_msg.metadata
metadata.update({"async_update": "extend"})
metadata.update({"async_update": self.parent.async_update})
msg = messages.DeviceMessage(
signals={self.parent.readback.name: self.parent.data_buffer},
@ -72,7 +72,7 @@ class SimMonitorAsyncPrepare(CustomDetectorMixin):
def on_trigger(self):
"""Prepare the device for triggering."""
self.parent.data_buffer["value"].append(self.parent.readback.get())
self.parent.data_buffer["value"].append(self.parent.readback.timestamp)
self.parent.data_buffer["timestamp"].append(self.parent.readback.timestamp)
self._counter += 1
self.parent.current_trigger.set(self._counter).wait()
if self._counter % self._random_send_interval == 0:

View File

@ -415,7 +415,7 @@ def test_async_mon_send_data_to_bec(async_monitor):
async_monitor.custom_prepare._send_data_to_bec()
dev_msg = messages.DeviceMessage(
signals={async_monitor.readback.name: async_monitor.data_buffer},
metadata={"async_update": "extend"},
metadata={"async_update": async_monitor.async_update},
)
call = [