mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-04 13:24:13 +08:00
Hide lead metrics and stopped timer only in RoadScore replay UI
This commit is contained in:
@@ -70,6 +70,7 @@ initial_display={'readiness':'Preparing','composer':a.composer,'profile':a.profi
|
||||
if a.replay:initial_display.update(style='Stored score',section='ARCHIVED SCORE',compute='none')
|
||||
(out/'roadscore_status.json').write_text(json.dumps(initial_display))
|
||||
env['ROADSCORE_OVERLAY']='1' if settings.overlay else '0'
|
||||
env['ROADSCORE_CLEAN_DEMO_UI']='1'
|
||||
env['ROADSCORE_FORCE_MUTE']='0' if a.audible else '1'
|
||||
env['ROADSCORE_ORIGIN_FILE']=str(out/'replay_origin.json')
|
||||
env['ROADSCORE_UI_AUDIT']=str(out/'ui_audit.jsonl');env['PWD']=str(rt)
|
||||
|
||||
@@ -14,6 +14,15 @@ UIState._update_state=replay_state
|
||||
preparation_wake=PreparationWake(os.environ.get("ROADSCORE_STATUS_FILE"),Path("/TICI").exists())
|
||||
from openpilot.selfdrive.ui.onroad.cameraview import CameraView
|
||||
from openpilot.selfdrive.ui.mici.onroad.model_renderer import ModelRenderer
|
||||
if os.environ.get('ROADSCORE_CLEAN_DEMO_UI')=='1':
|
||||
from openpilot.selfdrive.ui.mici.onroad.augmented_road_view import StandstillTimerOverlay
|
||||
from openpilot.selfdrive.ui.onroad.model_renderer import ModelRenderer as StandardModelRenderer
|
||||
from openpilot.selfdrive.ui.onroad.starpilot.widgets.stopped_timer import StoppedTimerWidget
|
||||
# Process-local presentation overrides; user settings and normal driving stay intact.
|
||||
ModelRenderer._draw_lead_info=lambda self,*args,**kwargs:None
|
||||
StandardModelRenderer._draw_lead_metrics=lambda self,*args,**kwargs:None
|
||||
StandstillTimerOverlay.render=lambda self,*args,**kwargs:False
|
||||
StoppedTimerWidget._update_timer=lambda self:0
|
||||
counts={'accepted_camera_frames':0,'path_draw_calls':0,'lane_draw_calls':0,'nonempty_path_draws':0,'nonempty_lane_draws':0,'camera_texture_draws':0};last=0.;original_update=UIState.update;original_accept=CameraView._accept_frame;original_path=ModelRenderer._draw_path;original_lanes=ModelRenderer._draw_lane_lines;original_textures=CameraView._render_textures
|
||||
out=Path(os.environ['ROADSCORE_UI_AUDIT']).open('w',buffering=1)
|
||||
def accept(self,*args,**kw):
|
||||
|
||||
Reference in New Issue
Block a user