From 9b7bf4a101560b57da23c4000b9e7e89e0f4e222 Mon Sep 17 00:00:00 2001 From: David <49467229+TheSecurityDev@users.noreply.github.com> Date: Fri, 13 Feb 2026 11:26:14 -0600 Subject: [PATCH] mici ui replay: fix indeterminism with swiping and animations (#37110) * fix: get_time and get_frame_time determinism * remove some hackiness * don't need that --- selfdrive/ui/tests/diff/replay.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/tests/diff/replay.py b/selfdrive/ui/tests/diff/replay.py index fdba5c350..1efc6dde9 100755 --- a/selfdrive/ui/tests/diff/replay.py +++ b/selfdrive/ui/tests/diff/replay.py @@ -90,8 +90,11 @@ def run_replay(): main_layout = MiciMainLayout() main_layout.set_rect(rl.Rectangle(0, 0, gui_app.width, gui_app.height)) - frame = 0 script_index = 0 + frame = 0 + # Override raylib timing functions to return deterministic values based on frame count instead of real time + rl.get_frame_time = lambda: 1.0 / FPS + rl.get_time = lambda: frame / FPS for should_render in gui_app.render(): while script_index < len(SCRIPT) and SCRIPT[script_index][0] == frame: