mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
fix: fixed logic in data subscription
This commit is contained in:
@ -382,7 +382,7 @@ class BasicPlot(QtWidgets.QWidget):
|
|||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
continue
|
continue
|
||||||
endpoint = f"px_stream/projection_{self._current_proj}/data"
|
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]
|
data = [BECMessage.DeviceMessage.loads(msg) for msg in msgs]
|
||||||
if not data:
|
if not data:
|
||||||
continue
|
continue
|
||||||
@ -399,7 +399,8 @@ class BasicPlot(QtWidgets.QWidget):
|
|||||||
|
|
||||||
@pyqtSlot(dict, dict)
|
@pyqtSlot(dict, dict)
|
||||||
def on_dap_update(self, data: dict, metadata: 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)
|
@pyqtSlot(dict)
|
||||||
def new_proj(self, data):
|
def new_proj(self, data):
|
||||||
|
Reference in New Issue
Block a user