From a780ef420107a282b224a0e4ed980cf007cf32e3 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt Date: Fri, 9 May 2025 14:56:15 +0200 Subject: [PATCH] Skip frames early in display.image to avoid applying axis configuration from data --- src/metro/devices/display/image.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/metro/devices/display/image.py b/src/metro/devices/display/image.py index 163fdf7..6848fb5 100644 --- a/src/metro/devices/display/image.py +++ b/src/metro/devices/display/image.py @@ -486,6 +486,17 @@ def _get_axis_idx(axis_order): return 0, 1 def dataAdded(self, d): + if self.pause_drawing: + if self.redraw_once: + self.redraw_once = False + else: + return + + if self.throttle_total > 0: + if self.throttle_i < self.throttle_total: + self.throttle_i += 1 + return + if self.history_streak > 0: d = np.squeeze(d) @@ -545,17 +556,6 @@ def dataAdded(self, d): else: raise ValueError('incompatible type') - if self.pause_drawing: - if self.redraw_once: - self.redraw_once = False - else: - return - - if self.throttle_total > 0: - if self.throttle_i < self.throttle_total: - self.throttle_i += 1 - return - z_scale = False if self.auto_z_scale: