mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 12:32:06 +08:00
clips: use AugmentedRoadView instead of MainLayout (#37053)
Render only the road view in clips rather than the full main layout, matching the updated UI module structure.
This commit is contained in:
+5
-5
@@ -265,9 +265,9 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
|
||||
|
||||
import pyray as rl
|
||||
if big:
|
||||
from openpilot.selfdrive.ui.layouts.main import MainLayout
|
||||
from openpilot.selfdrive.ui.onroad.augmented_road_view import AugmentedRoadView
|
||||
else:
|
||||
from openpilot.selfdrive.ui.mici.layouts.main import MiciMainLayout as MainLayout # type: ignore[assignment]
|
||||
from openpilot.selfdrive.ui.mici.onroad.augmented_road_view import AugmentedRoadView # type: ignore[assignment]
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE
|
||||
timer.lap("import")
|
||||
@@ -298,8 +298,8 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
|
||||
patch_submaster(message_chunks, ui_state)
|
||||
gui_app.init_window("clip", fps=FRAMERATE)
|
||||
|
||||
main_layout = MainLayout()
|
||||
main_layout.set_rect(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
|
||||
road_view = AugmentedRoadView()
|
||||
road_view.set_rect(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
|
||||
font = gui_app.font(FontWeight.NORMAL)
|
||||
timer.lap("setup")
|
||||
|
||||
@@ -312,7 +312,7 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
|
||||
vipc.send(VisionStreamType.VISION_STREAM_ROAD, frame_bytes, frame_idx, int(frame_idx * 5e7), int(frame_idx * 5e7))
|
||||
ui_state.update()
|
||||
if should_render:
|
||||
main_layout.render()
|
||||
road_view.render()
|
||||
render_overlays(rl, gui_app, font, FONT_SCALE, metadata, title, start, frame_idx, show_metadata, show_time)
|
||||
frame_idx += 1
|
||||
pbar.update(1)
|
||||
|
||||
Reference in New Issue
Block a user