From b28425b8c3261ac6e406f0f3a9b726e0a2b28c3c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 17 Oct 2025 19:11:12 -0700 Subject: [PATCH] raylib: fix broken pairing dialog first 5m after startup (#36397) * always try on dialog show * except logging * huge oof --- selfdrive/ui/widgets/pairing_dialog.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/selfdrive/ui/widgets/pairing_dialog.py b/selfdrive/ui/widgets/pairing_dialog.py index 252a7dd94d..3778586f89 100644 --- a/selfdrive/ui/widgets/pairing_dialog.py +++ b/selfdrive/ui/widgets/pairing_dialog.py @@ -34,7 +34,7 @@ class PairingDialog(Widget): super().__init__() self.params = Params() self.qr_texture: rl.Texture | None = None - self.last_qr_generation = 0 + self.last_qr_generation = float('-inf') self._close_btn = IconButton(gui_app.texture("icons/close.png", 80, 80)) self._close_btn.set_click_callback(lambda: gui_app.set_modal_overlay(None)) @@ -42,8 +42,8 @@ class PairingDialog(Widget): try: dongle_id = self.params.get("DongleId") or "" token = Api(dongle_id).get_token({'pair': True}) - except Exception as e: - cloudlog.warning(f"Failed to get pairing token: {e}") + except Exception: + cloudlog.exception("Failed to get pairing token") token = "" return f"https://connect.comma.ai/?pair={token}" @@ -67,8 +67,8 @@ class PairingDialog(Widget): rl_image.format = rl.PixelFormat.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 self.qr_texture = rl.load_texture_from_image(rl_image) - except Exception as e: - cloudlog.warning(f"QR code generation failed: {e}") + except Exception: + cloudlog.exception("QR code generation failed") self.qr_texture = None def _check_qr_refresh(self) -> None: