From eb0d3dc26ea7205ae4afd69f81f2605d61314710 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 7 Mar 2022 07:20:58 -0500 Subject: [PATCH] Facepalm**2: only update on special "update" msg --- piker/fsp/_engine.py | 2 +- piker/ui/_fsp.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/piker/fsp/_engine.py b/piker/fsp/_engine.py index f1904000..951aa186 100644 --- a/piker/fsp/_engine.py +++ b/piker/fsp/_engine.py @@ -213,7 +213,7 @@ async def fsp_compute( # always trigger UI refresh after history update, # see ``piker.ui._fsp.FspAdmin.open_chain()`` and # ``piker.ui._display.trigger_update()``. - await stream.send(index) + await stream.send('update') async for processed in out_stream: diff --git a/piker/ui/_fsp.py b/piker/ui/_fsp.py index d1076981..41572a58 100644 --- a/piker/ui/_fsp.py +++ b/piker/ui/_fsp.py @@ -50,6 +50,7 @@ from ._forms import ( mk_form, open_form_input_handling, ) +from . import _display from ..fsp._api import maybe_mk_fsp_shm, Fsp from ..fsp import cascade from ..fsp._volume import ( @@ -437,12 +438,11 @@ class FspAdmin: started.set() - from ._display import trigger_update - # wait for graceful shutdown signal async with stream.subscribe() as stream: async for msg in stream: - trigger_update() + if msg == 'update': + _display.trigger_update(self.linked) await complete.wait()