From a653ed1c331762e4ef106ed043c6aaafd772a475 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Sat, 19 Sep 2026 20:41:46 -0700 Subject: [PATCH] Hide lead metrics and stopped timer only in RoadScore replay UI --- roadscore/prototype/normal_onroad.py | 1 + roadscore/prototype/normal_ui_audit.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/roadscore/prototype/normal_onroad.py b/roadscore/prototype/normal_onroad.py index 54d3820cb5..aa1c313947 100644 --- a/roadscore/prototype/normal_onroad.py +++ b/roadscore/prototype/normal_onroad.py @@ -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) diff --git a/roadscore/prototype/normal_ui_audit.py b/roadscore/prototype/normal_ui_audit.py index d2fded8711..db5dfcaf63 100644 --- a/roadscore/prototype/normal_ui_audit.py +++ b/roadscore/prototype/normal_ui_audit.py @@ -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):