mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
PathEdge cleanup
This commit is contained in:
@@ -51,6 +51,7 @@ def _load_starpilot_onroad_view(monkeypatch):
|
||||
dummy_widget = type("DummyWidget", (), {})
|
||||
color = SimpleNamespace(r=0, g=0, b=0, a=255)
|
||||
|
||||
stub_module("openpilot.selfdrive.ui.onroad.starpilot.pip_sidecam", PipSideCamera=dummy_widget)
|
||||
stub_module("openpilot.selfdrive.ui.onroad.augmented_road_view", AugmentedRoadView=AugmentedRoadView)
|
||||
stub_module(
|
||||
"openpilot.selfdrive.ui.onroad.starpilot.starpilot_border",
|
||||
@@ -192,6 +193,7 @@ def test_starpilot_road_overlays_use_the_parent_scissor(monkeypatch):
|
||||
view.model_renderer = SimpleNamespace(
|
||||
_path=SimpleNamespace(projected_points=SimpleNamespace(size=1)),
|
||||
_track_edge_vertices=SimpleNamespace(size=4),
|
||||
_path_edge_width=0.3,
|
||||
)
|
||||
view._font_bold = object()
|
||||
view._get_border_width = lambda: 0
|
||||
@@ -209,3 +211,9 @@ def test_starpilot_road_overlays_use_the_parent_scissor(monkeypatch):
|
||||
view._render_extra_road_overlays(object())
|
||||
|
||||
assert events == ["path_edges", "adjacent_lanes", "stopping_point"]
|
||||
|
||||
events.clear()
|
||||
view.model_renderer._path_edge_width = 0.0
|
||||
view._render_extra_road_overlays(object())
|
||||
|
||||
assert events == ["adjacent_lanes", "stopping_point"]
|
||||
|
||||
Reference in New Issue
Block a user