0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 03:01:50 +02:00

fix: fixed logic in data subscription

This commit is contained in:
2023-08-09 21:39:28 +02:00
parent 7bec0b5e6c
commit c2d469b454

View File

@ -382,7 +382,7 @@ class BasicPlot(QtWidgets.QWidget):
time.sleep(0.1)
continue
endpoint = f"px_stream/projection_{self._current_proj}/data"
msgs = client.producer.lrange(topic=endpoint, start=-1, end=-1)
msgs = client.producer.lrange(topic=endpoint, start=0, end=0)
data = [BECMessage.DeviceMessage.loads(msg) for msg in msgs]
if not data:
continue
@ -399,7 +399,8 @@ class BasicPlot(QtWidgets.QWidget):
@pyqtSlot(dict, dict)
def on_dap_update(self, data: dict, metadata: dict):
time.sleep(0.1)
self.img.setImage(data["z"].T)
# time.sleep(0,1)
@pyqtSlot(dict)
def new_proj(self, data):