ui: fix QR code refresh tracking in pairing dialog (#35529)

fix QR code refresh tracking

Co-authored-by: Shane Smiskol <shane@smiskol.com>
pull/35536/head
Dean Lee 5 days ago committed by GitHub
parent 9d8e4acec9
commit f3d0a9ea13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      selfdrive/ui/widgets/pairing_dialog.py

@ -58,6 +58,7 @@ class PairingDialog:
current_time = time.time() current_time = time.time()
if current_time - self.last_qr_generation >= self.QR_REFRESH_INTERVAL: if current_time - self.last_qr_generation >= self.QR_REFRESH_INTERVAL:
self._generate_qr_code() self._generate_qr_code()
self.last_qr_generation = current_time
def render(self, rect: rl.Rectangle) -> int: def render(self, rect: rl.Rectangle) -> int:
rl.clear_background(rl.Color(224, 224, 224, 255)) rl.clear_background(rl.Color(224, 224, 224, 255))

Loading…
Cancel
Save