diff --git a/piker/ui/_dataviz.py b/piker/ui/_dataviz.py index a417a475..a024b3b5 100644 --- a/piker/ui/_dataviz.py +++ b/piker/ui/_dataviz.py @@ -658,7 +658,11 @@ class Viz(msgspec.Struct): # , frozen=True): **kwargs, - ) -> pg.GraphicsObject: + ) -> tuple[ + bool, + tuple[int, int], + pg.GraphicsObject, + ]: ''' Read latest datums from shm and render to (incrementally) render to graphics. @@ -688,8 +692,9 @@ class Viz(msgspec.Struct): # , frozen=True): not in_view.size or not render ): - # print('exiting early') + # print(f'{self.name} not in view (exiting early)') return ( + False, (ivl, ivr), graphics, ) @@ -810,6 +815,7 @@ class Viz(msgspec.Struct): # , frozen=True): if not out: log.warning(f'{self.name} failed to render!?') return ( + False, (ivl, ivr), graphics, ) @@ -865,6 +871,7 @@ class Viz(msgspec.Struct): # , frozen=True): self._in_ds = r._in_ds return ( + True, (ivl, ivr), graphics, ) @@ -1053,7 +1060,9 @@ class Viz(msgspec.Struct): # , frozen=True): l_reset = r_reset - rl_diff else: - raise RuntimeError(f'Unknown view state {vl} -> {vr}') + log.warning(f'Unknown view state {vl} -> {vr}') + # return + # raise RuntimeError(f'Unknown view state {vl} -> {vr}') else: # maintain the l->r view distance diff --git a/piker/ui/_display.py b/piker/ui/_display.py index 64c0b271..66f3679f 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -557,7 +557,7 @@ def graphics_update_cycle( (liv and do_px_step) or trigger_all ): - i_read_range, _ = main_viz.update_graphics() + _, i_read_range, _ = main_viz.update_graphics() profiler('`Viz.update_graphics()` call') ( diff --git a/piker/ui/_fsp.py b/piker/ui/_fsp.py index e3a6cfef..2e2e76c1 100644 --- a/piker/ui/_fsp.py +++ b/piker/ui/_fsp.py @@ -707,7 +707,7 @@ async def open_vlm_displays( last_val_sticky.update_from_data(-1, value) - _, vlm_curve = vlm_chart.update_graphics_from_flow( + _, _, vlm_curve = vlm_chart.update_graphics_from_flow( 'volume', )