From a29ec875deddb8200a0b44f8dbbb0e35d1c82094 Mon Sep 17 00:00:00 2001 From: royjr Date: Sun, 21 Dec 2025 21:53:05 -0500 Subject: [PATCH] Update exp_button.py --- selfdrive/ui/onroad/exp_button.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/onroad/exp_button.py b/selfdrive/ui/onroad/exp_button.py index e5d8171413..79adb2f9cb 100644 --- a/selfdrive/ui/onroad/exp_button.py +++ b/selfdrive/ui/onroad/exp_button.py @@ -50,7 +50,12 @@ class ExpButton(Widget): texture = self._txt_exp if self._held_or_actual_mode() else self._txt_wheel rl.draw_circle(center_x, center_y, self._rect.width / 2, self._black_bg) - rl.draw_texture(texture, center_x - texture.width // 2, center_y - texture.height // 2, self._white_color) + + src_rect = rl.Rectangle(0.0, 0.0, texture.width, texture.height) + dest_rect = rl.Rectangle(center_x, center_y, texture.width, texture.height) + origin = rl.Vector2(texture.width / 2.0, texture.height / 2.0) + rotation = -ui_state.sm['carState'].steeringAngleDeg + rl.draw_texture_pro(texture, src_rect, dest_rect, origin, rotation, self._white_color) def _held_or_actual_mode(self): now = time.monotonic()