From 6d71a0a37e98d2fe9445e2338d44ae4c3a276598 Mon Sep 17 00:00:00 2001 From: builder Date: Mon, 14 Sep 2026 07:54:16 +0000 Subject: [PATCH] Samples: Fix warm-up stability check in the GUI Fix a bug in the camera warm-up GUI where computing the recent rate of change could fail or return an incorrect value, which could make the warm-up stability indicator wrong. --- modules/zividsamples/gui/preparation/warmup_gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/zividsamples/gui/preparation/warmup_gui.py b/modules/zividsamples/gui/preparation/warmup_gui.py index 0a11d001..2ed494cb 100644 --- a/modules/zividsamples/gui/preparation/warmup_gui.py +++ b/modules/zividsamples/gui/preparation/warmup_gui.py @@ -306,7 +306,7 @@ def temperature_is_stable(self) -> bool: one_minute_ago = now - timedelta(minutes=1) last_minute_of_data = self.df[self.df["timestamp"] >= one_minute_ago] - max_rate_of_change_in_the_last_minute = float(last_minute_of_data["average_rate_of_change"].max()) + max_rate_of_change_in_the_last_minute = float(np.asarray(last_minute_of_data["average_rate_of_change"]).max()) return ( self.df["average_rate_of_change"].iloc[-1] is not None