From 9ef829516de40bea21d556c7e99f76380846ffb4 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Tue, 16 Jul 2024 19:46:22 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0]=E7=BA=A2=E7=BB=BF=E7=81=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/datacenter/v2x/TrafficLightDispatcher.kt | 7 +++++-- .../hmi/ui/notice/traffic/TrafficLightPromptView.kt | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt index 51ba8a98c7..e8e68d2532 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/TrafficLightDispatcher.kt @@ -225,7 +225,9 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight * 车辆行驶中,若判断当前绿灯自车基于当前速度需提速10%以上才可通过时,提示“蘑菇提醒您及时减速,避免路口急刹” * 车辆行驶中,若判断当前红灯自车基于当前速度需降低60%以上才可通过时,提示“蘑菇提醒您及时减速,避免路口急刹” */ - if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !isTurnGreen){ + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + && AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode + ) && !isTurnGreen){ //车辆等红灯,在红/黄灯剩余5s且下一灯态为绿灯时,提示“红灯即将变绿”;并在变为绿灯时有提示起步的动效 if((light.state == FusionTrafficLightOuterClass.FusionLightState.STATE_YELLOW_FUSION || light.state ==FusionTrafficLightOuterClass.FusionLightState.STATE_RED_FUSION) && light.duration < 5 && light.nextState == FusionTrafficLightOuterClass.FusionLightState.STATE_GREEN_FUSION){ @@ -235,7 +237,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight } } - if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !isPrompted){ + if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + && AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && !isPrompted){ //车辆行驶中,若判断当前绿灯自车无法通过,在绿灯剩余5s且下一灯态为红/黄灯时,提示“蘑菇提醒您及时减速,避免路口急刹” if(light.state == FusionTrafficLightOuterClass.FusionLightState.STATE_GREEN_FUSION && light.duration < 5){ CallerMapRoadListenerManager.getStopLineDistance()?.let { dis-> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt index a09fa4070b..f4ac4d79e5 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/traffic/TrafficLightPromptView.kt @@ -60,6 +60,12 @@ class TrafficLightPromptView @JvmOverloads constructor( } val endTime = System.nanoTime() val internal = TimeUnit.NANOSECONDS.toMillis(endTime - startTime) + if(internal > 700){ + UiThreadHandler.post { + tvTrafficNum?.text = "0." + tvTrafficNumDecimal?.text = "00" + } + } if(internal>1500){ UiThreadHandler.post{ this@TrafficLightPromptView.visibility = GONE @@ -159,7 +165,7 @@ class TrafficLightPromptView @JvmOverloads constructor( tvTrafficNumDecimal?.text = (currentDuration*100 - currentDuration.toInt()*100).toInt().toString() }else{ tvTrafficNum?.text = "0." - tvTrafficNumDecimal?.text = "0" + tvTrafficNumDecimal?.text = "00" this@TrafficLightPromptView.visibility = View.GONE } when(nextState){