ui: flip driver camera horizontally (#35712)

flip driver camera horizontally
pull/35723/head
Dean Lee 3 days ago committed by GitHub
parent db37f4187e
commit 55579c8c08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      selfdrive/ui/onroad/cameraview.py

@ -179,6 +179,9 @@ class CameraView(Widget):
transform = self._calc_frame_matrix(rect)
src_rect = rl.Rectangle(0, 0, float(self.frame.width), float(self.frame.height))
# Flip driver camera horizontally
if self._stream_type == VisionStreamType.VISION_STREAM_DRIVER:
src_rect.width = -src_rect.width
# Calculate scale
scale_x = rect.width * transform[0, 0] # zx

Loading…
Cancel
Save