From acbd85d98bfae234d7af837f78eb0b502d25365e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Sep 2021 18:41:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTTS=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=8F=8A=E8=BD=A6=E6=A8=A1=E5=9E=8B=E6=9B=B4=E6=9B=BF=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/obu/mogo/MogoPrivateObuManager.kt | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt index 794aed921d..ce7008d41a 100644 --- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt +++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt @@ -415,7 +415,7 @@ class MogoPrivateObuManager private constructor() { override fun onCvxV2vThreatIndInfo(info: CvxV2vThreatIndInfo?) { Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxV2vThreatIndInfo ------> $info") info?.let { - //预警信息,预警类型 threat_level 3 + //预警信息,预警类型 threat_level 2、3 info.threat_info?.let { //预警方位 val direction = getMessageDirection(info.ext_info.target_classification) @@ -719,30 +719,28 @@ class MogoPrivateObuManager private constructor() { MogoObuConst.TAG_MOGO_OBU, "appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction" ) - if (!isStrikeTts) { - //显示警告红边 - mIMoGoWaringProvider?.showWarning(direction) - //显示弹框,语音提示 - mIMoGoWaringProvider?.showWarningV2X( - appId, - alertContent, - ttsContent, - appId.toString(), - object : WarningStatusListener { - override fun onShow() { - isStrikeTts = true - } - - override fun onDismiss() { - isStrikeTts = false - } + //显示警告红边 + mIMoGoWaringProvider?.showWarning(direction) + //显示弹框,语音提示 + mIMoGoWaringProvider?.showWarningV2X( + appId, + alertContent, + if (!isStrikeTts) ttsContent else "", + (appId + direction.direction).toString(), + object : WarningStatusListener { + override fun onShow() { + isStrikeTts = true + } + + override fun onDismiss() { + isStrikeTts = false } - ) - //更新周边车辆进行预警颜色变换,车辆实时移动和变色 - TrafficDataConvertUtils.cvxV2vThreatIndInfo2TrafficData(info)?.let { - TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) } - } + ) + } + //更新周边车辆进行预警颜色变换,车辆实时移动和变色 + TrafficDataConvertUtils.cvxV2vThreatIndInfo2TrafficData(info)?.let { + TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) } } // 删除