From cd1e2cfcf680ec7f371938bc6bf9edbd49ea534c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Fri, 10 Sep 2021 22:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E7=BA=A2=E8=BE=B9=E7=9A=84=E8=BF=81=E7=A7=BBHMI=20=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=96=B9=E5=BC=8F=E4=B8=BA=20//=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=AD=A6=E5=91=8A=E7=BA=A2=E8=BE=B9=20mIMoGoWaringProvider!!.s?= =?UTF-8?q?howWarning(direction)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenfufeng --- .idea/misc.xml | 67 +------ config.gradle | 1 + gradle.properties | 1 + .../main/launcher/MainLauncherActivity.java | 16 +- modules.txt | 1 + modules/mogo-module-obu-mogo/build.gradle | 2 + .../module/obu/mogo/MogoPrivateObuManager.kt | 183 +++++++++--------- settings.gradle | 1 + 8 files changed, 108 insertions(+), 164 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 82120a2874..6d402a6181 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -13,39 +13,11 @@ - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + - - - @@ -56,41 +28,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/config.gradle b/config.gradle index 4c6c2a5bff..6fb1fa0308 100644 --- a/config.gradle +++ b/config.gradle @@ -99,6 +99,7 @@ ext { modulemainindependent : "com.mogo.module:module-main-independent:${MOGO_MODULE_MAIN_INDEPENDENT_VERSION}", modulemap : "com.mogo.module:module-map:${MOGO_MODULE_MAP_VERSION}", moduleservice : "com.mogo.module:module-service:${MOGO_MODULE_SERVICE_VERSION}", + moduledata : "com.mogo.module:module-data:${MOGO_MODULE_DATA_VERSION}", mogoservice : "com.mogo.service:mogo-service:${MOGO_SERVICE_VERSION}", mogoserviceapi : "com.mogo.service:mogo-service-api:${MOGO_SERVICE_API_VERSION}", moduleapps : "com.mogo.module:module-apps:${MOGO_MODULE_APPS_VERSION}", diff --git a/gradle.properties b/gradle.properties index 1a061b83f1..081f05562b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -68,6 +68,7 @@ MOGO_MODULE_COMMON_VERSION=2.0.58 MOGO_MODULE_MAIN_VERSION=2.0.58 MOGO_MODULE_MAP_VERSION=2.0.58 MOGO_MODULE_SERVICE_VERSION=2.0.58 +MOGO_MODULE_DATA_VERSION=2.0.58 MOGO_MODULE_EXTENSIONS_VERSION=2.0.58 MOGO_MODULE_SEARCH_VERSION=2.0.58 MOGO_MODULE_BACK_VERSION=2.0.58 diff --git a/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java b/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java index ffc46c5fde..b892b3df2d 100644 --- a/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java +++ b/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java @@ -190,44 +190,44 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis mWarningLeft.setVisibility(View.GONE); mWarningRight.setVisibility(View.GONE); mWarningBottom.setVisibility(View.GONE); -// startCountDownWithView(mWarningTop); + startCountDownWithView(mWarningTop); break; case ALERT_THE_FRONT_CRASH_WARNING_LEFT: mWarningLeft.setVisibility(View.VISIBLE); mWarningTop.setVisibility(View.GONE); mWarningRight.setVisibility(View.GONE); mWarningBottom.setVisibility(View.GONE); -// startCountDownWithView(mWarningLeft); + startCountDownWithView(mWarningLeft); break; case ALERT_THE_FRONT_CRASH_WARNING_RIGHT: mWarningRight.setVisibility(View.VISIBLE); mWarningTop.setVisibility(View.GONE); mWarningLeft.setVisibility(View.GONE); mWarningBottom.setVisibility(View.GONE); -// startCountDownWithView(mWarningRight); + startCountDownWithView(mWarningRight); break; case ALERT_THE_FRONT_CRASH_WARNING_BOTTOM: mWarningBottom.setVisibility(View.VISIBLE); mWarningRight.setVisibility(View.GONE); mWarningTop.setVisibility(View.GONE); mWarningLeft.setVisibility(View.GONE); -// startCountDownWithView(mWarningBottom); + startCountDownWithView(mWarningBottom); break; case ALERT_THE_FRONT_CRASH_WARNING_BOTTOM_LEFT: mWarningBottom.setVisibility(View.VISIBLE); mWarningRight.setVisibility(View.GONE); mWarningTop.setVisibility(View.GONE); mWarningLeft.setVisibility(View.VISIBLE); -// startCountDownWithView(mWarningBottom); -// startCountDownWithView(mWarningLeft); + startCountDownWithView(mWarningBottom); + startCountDownWithView(mWarningLeft); break; case ALERT_THE_FRONT_CRASH_WARNING_BOTTOM_RIGHT: mWarningBottom.setVisibility(View.VISIBLE); mWarningRight.setVisibility(View.VISIBLE); mWarningTop.setVisibility(View.GONE); mWarningLeft.setVisibility(View.GONE); -// startCountDownWithView(mWarningBottom); -// startCountDownWithView(mWarningRight); + startCountDownWithView(mWarningBottom); + startCountDownWithView(mWarningRight); break; default: break; diff --git a/modules.txt b/modules.txt index 554000191f..a742e2f2a4 100644 --- a/modules.txt +++ b/modules.txt @@ -1,3 +1,4 @@ +:modules:mogo-module-data :foudations:mogo-utils :skin:mogo-skin-support :tts:tts-base diff --git a/modules/mogo-module-obu-mogo/build.gradle b/modules/mogo-module-obu-mogo/build.gradle index 8248650ec0..411735d7a2 100644 --- a/modules/mogo-module-obu-mogo/build.gradle +++ b/modules/mogo-module-obu-mogo/build.gradle @@ -54,10 +54,12 @@ dependencies { api rootProject.ext.dependencies.mogoutils api rootProject.ext.dependencies.mogoserviceapi implementation rootProject.ext.dependencies.modulecommon + implementation rootProject.ext.dependencies.moduledata } else { api project(":foudations:mogo-utils") api project(':services:mogo-service-api') implementation project(':modules:mogo-module-common') + implementation project(':modules:mogo-module-data') } implementation rootProject.ext.dependencies.mogoobu 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 39b20650a2..b0a72bc535 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 @@ -7,6 +7,7 @@ import com.mogo.commons.voice.AIAssist import com.mogo.module.common.datacenter.SnapshotLocationDataCenter import com.mogo.module.common.drawer.TrafficMarkerDrawer import com.mogo.module.common.enums.EventTypeEnum +import com.mogo.module.data.enums.WarningDirectionEnum import com.mogo.module.obu.mogo.utils.TrafficDataConvertUtils import com.mogo.service.IMogoServiceApis import com.mogo.service.MogoServicePaths @@ -164,8 +165,8 @@ class MogoPrivateObuManager private constructor() { val status = info.status val level = info.threat_info.threat_level val direction = - getOtherObjDirection(if (info.ext_info != null) info.ext_info.pos_classification else 7) - when (info.threat_info.app_id.toString()) { + getMessageDirection(if (info.ext_info != null) info.ext_info.pos_classification else -1) + when (appId) { // 道路危险情况预警 EventTypeEnum.TYPE_USECASE_ID_HLW.poiType -> { Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxRtiThreatIndInfo appId = ${info.threat_info.app_id} --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type}") @@ -174,11 +175,15 @@ class MogoPrivateObuManager private constructor() { 0x2 -> { // 特殊处理左、右方向的 when (direction) { - 3 -> { + WarningDirectionEnum.ALERT_WARNING_LEFT, + WarningDirectionEnum.ALERT_WARNING_TOP_LEFT, + WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT -> { appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType } - 4 -> { + WarningDirectionEnum.ALERT_WARNING_RIGHT, + WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT, + WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT -> { appId = EventTypeEnum.TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType } @@ -242,9 +247,7 @@ class MogoPrivateObuManager private constructor() { // 添加 ObuConstants.STATUS.ADD -> { //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - direction, "ACTION_V2X_FRONT_WARNING" - ) + mIMoGoWaringProvider!!.showWarning(direction) //显示弹框,语音提示 mIMoGoWaringProvider!!.showWarningV2X( appId.toInt(), @@ -259,10 +262,8 @@ class MogoPrivateObuManager private constructor() { } // 删除 ObuConstants.STATUS.DELETE -> { - //关闭警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - 0, "ACTION_V2X_FRONT_WARNING" - ) + // 关闭警告红边 + mIMoGoWaringProvider!!.showWarning(WarningDirectionEnum.ALERT_WARNING_NON) // 移除顶部弹窗 mIMoGoWaringProvider?.disableWarningV2X(appId) // 更新数据 @@ -275,9 +276,7 @@ class MogoPrivateObuManager private constructor() { // 更新 else -> { //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - direction, "ACTION_V2X_FRONT_WARNING" - ) + mIMoGoWaringProvider!!.showWarning(direction) // 更新数据 TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let { TrafficMarkerDrawer.updateITrafficInfo(it) @@ -322,6 +321,17 @@ class MogoPrivateObuManager private constructor() { MogoObuConst.TAG_MOGO_OBU, "onCvxPtcInfoIndInfo ---status---> ${info.status}" ) + var v2xType = "" + if (info.ptc_type == 1) { //摩托车 + v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType + } else if (info.ptc_type == 2) { //行人 + v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType + } + val ttsContent = EventTypeEnum.getWarningTts(v2xType) + val alertContent = EventTypeEnum.getWarningContent(v2xType) + val direction = + getMessageDirection(if (info.ext_info != null) info.ext_info.target_classification else -1) + when (info.status) { // 添加 ObuConstants.STATUS.ADD -> { @@ -329,21 +339,8 @@ class MogoPrivateObuManager private constructor() { TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let { TrafficMarkerDrawer.updateITrafficInfo(it) } - - var v2xType = "" - if (info.ptc_type == 1) { //摩托车 - v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType - } else if (info.ptc_type == 2) { //行人 - v2xType = EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType - } - val ttsContent = EventTypeEnum.getWarningTts(v2xType) - val alertContent = EventTypeEnum.getWarningContent(v2xType) - val direction = 1 - //getOtherObjDirection(if (info.ext_info != null) info.ext_info.target_classification else 7) //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - direction, "ACTION_V2X_FRONT_WARNING" - ) + mIMoGoWaringProvider!!.showWarning(direction) mIMoGoWaringProvider!!.showWarningV2X( v2xType.toInt(), alertContent, @@ -353,10 +350,8 @@ class MogoPrivateObuManager private constructor() { } // 删除 ObuConstants.STATUS.DELETE -> { - //关闭警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - 0, "ACTION_V2X_FRONT_WARNING" - ) + // 关闭警告红边 + mIMoGoWaringProvider!!.showWarning(WarningDirectionEnum.ALERT_WARNING_NON) // 更新数据 TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let { // 事件结束,还原交通参与者颜色 @@ -367,12 +362,8 @@ class MogoPrivateObuManager private constructor() { } // 更新 else -> { - val direction = 1 - //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - direction, - "ACTION_V2X_FRONT_WARNING" - ) + // 显示警告红边 + mIMoGoWaringProvider!!.showWarning(direction) // 更新数据 TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let { TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it) @@ -437,51 +428,43 @@ class MogoPrivateObuManager private constructor() { /** * 获取消息的方位 车辆相关 */ - private fun getMessageDirection(targetClassification: Int): Int { + private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum { + Logger.d(MogoObuConst.TAG_MOGO_OBU, "预警红边:预警方向->$targetClassification") return when (targetClassification) { ObuConstants.TARGET_CLASSIFICATION.TC_ONCOMING_IN_LANE, - ObuConstants.TARGET_CLASSIFICATION.TC_AHEAD_IN_LANE -> 1 //正前方 + ObuConstants.TARGET_CLASSIFICATION.TC_AHEAD_IN_LANE, + 0x04 -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方 - ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_IN_LANE -> 2 //正后方 + 0x03 -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正右方 + + ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_IN_LANE, + 0x05 -> WarningDirectionEnum.ALERT_WARNING_BOTTOM //正后方 + + 0x02 -> WarningDirectionEnum.ALERT_WARNING_RIGHT //正左方 ObuConstants.TARGET_CLASSIFICATION.TC_AHEAD_LEFT, ObuConstants.TARGET_CLASSIFICATION.TC_AHEAD_FAR_LEFT, ObuConstants.TARGET_CLASSIFICATION.TC_ONCOMING_LEFT, ObuConstants.TARGET_CLASSIFICATION.TC_ONCOMING_FAR_LEFT, - ObuConstants.TARGET_CLASSIFICATION.TC_INTERSECTION_LEFT -> 3 //左前方 + ObuConstants.TARGET_CLASSIFICATION.TC_INTERSECTION_LEFT -> WarningDirectionEnum.ALERT_WARNING_TOP_LEFT //左前方 ObuConstants.TARGET_CLASSIFICATION.TC_ONCOMING_FAR_RIGHT, ObuConstants.TARGET_CLASSIFICATION.TC_AHEAD_FAR_RIGHT, ObuConstants.TARGET_CLASSIFICATION.TC_AHEAD_RIGHT, ObuConstants.TARGET_CLASSIFICATION.TC_INTERSECTION_RIGHT, - ObuConstants.TARGET_CLASSIFICATION.TC_ONCOMING_RIGHT -> 4 //右前方 + ObuConstants.TARGET_CLASSIFICATION.TC_ONCOMING_RIGHT -> WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT //右前方 ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_LEFT, - ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_FAR_LEFT -> 5 //左后方 弹框目前后方分为左后,右后,正后方 + ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_FAR_LEFT -> WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT //左后方 ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_RIGHT, - ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_FAR_RIGHT -> 6 //右后方 + ObuConstants.TARGET_CLASSIFICATION.TC_BEHIND_FAR_RIGHT -> WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT //右后方 - ObuConstants.TARGET_CLASSIFICATION.TC_UNCLASSIFIED -> -1 //未知 - else -> 0 + ObuConstants.TARGET_CLASSIFICATION.TC_UNCLASSIFIED -> WarningDirectionEnum.ALERT_WARNING_NON //未知 + else -> WarningDirectionEnum.ALERT_WARNING_ALL } } - /** - * 获取道路其他 的方位 - */ - private fun getOtherObjDirection(posClassification: Int): Int { - return when (posClassification) { - 0x01 -> 0 //事件中 - 0x02 -> 3 //左侧 - 0x03 -> 4 //右侧 - 0x04 -> 1 //前方 - 0x05 -> 2 //后方 - else -> 7 - } - - } - fun release() { MogoObuManager.getInstance().unregisterListener() } @@ -532,10 +515,7 @@ class MogoPrivateObuManager private constructor() { // 红灯 0x1 -> { //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - 1, - "ACTION_V2X_FRONT_WARNING" - ) + mIMoGoWaringProvider?.showWarning(WarningDirectionEnum.ALERT_WARNING_ALL) mIMoGoWaringProvider?.showWarningTrafficLight(1) mIMoGoWaringProvider?.changeCountdownRed(currentLight.count_down.toInt()) ttsContent = EventTypeEnum.getWarningTts(appId.toString()) @@ -599,7 +579,7 @@ class MogoPrivateObuManager private constructor() { */ private fun handleSdkObu( appId: Int, - direction: Int, + direction: WarningDirectionEnum, status: Int, level: Int, info: CvxV2vThreatIndInfo @@ -614,12 +594,20 @@ class MogoPrivateObuManager private constructor() { when (appId.toString()) { // 变道预警,注意左后车辆/注意右后车辆 EventTypeEnum.TYPE_USECASE_ID_LCW.poiType -> { - alertContent = EventTypeEnum.getWarningContent(appId.toString()) - ttsContent = EventTypeEnum.getWarningTts(appId.toString()) - if (direction == 5) { + alertContent = EventTypeEnum.getWarningContent(appId) + ttsContent = EventTypeEnum.getWarningTts(appId) + if ( + direction == WarningDirectionEnum.ALERT_WARNING_LEFT || + direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT || + direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT + ) { ttsContent = String.format(ttsContent, "左") alertContent = String.format(alertContent, "左") - } else if (direction == 6) { + } else if ( + direction == WarningDirectionEnum.ALERT_WARNING_RIGHT || + direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT || + direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT + ) { ttsContent = String.format(ttsContent, "右") alertContent = String.format(alertContent, "右") } @@ -644,11 +632,19 @@ class MogoPrivateObuManager private constructor() { //左转辅助 EventTypeEnum.TYPE_USECASE_ID_LTA.poiType -> { - alertContent = EventTypeEnum.getWarningContent(appId.toString()) - ttsContent = EventTypeEnum.getWarningTts(appId.toString()) - if (direction == 5) { + alertContent = EventTypeEnum.getWarningContent(appId) + ttsContent = EventTypeEnum.getWarningTts(appId) + if ( + direction == WarningDirectionEnum.ALERT_WARNING_LEFT || + direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT || + direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT + ) { ttsContent = String.format(ttsContent, "左") - } else if (direction == 6) { + } else if ( + direction == WarningDirectionEnum.ALERT_WARNING_RIGHT || + direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT || + direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT + ) { ttsContent = String.format(ttsContent, "右") } } @@ -672,12 +668,20 @@ class MogoPrivateObuManager private constructor() { //盲区预警 EventTypeEnum.TYPE_USECASE_ID_BSW.poiType -> { - ttsContent = EventTypeEnum.getWarningTts(appId.toString()) - alertContent = EventTypeEnum.getWarningContent(appId.toString()) - if (direction == 5) { //左后 + ttsContent = EventTypeEnum.getWarningTts(appId) + alertContent = EventTypeEnum.getWarningContent(appId) + if ( + direction == WarningDirectionEnum.ALERT_WARNING_LEFT || + direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT || + direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT + ) { //左后 ttsContent = String.format(ttsContent, "左") alertContent = String.format(alertContent, "左") - } else if (direction == 6) { //右后 + } else if ( + direction == WarningDirectionEnum.ALERT_WARNING_RIGHT || + direction == WarningDirectionEnum.ALERT_WARNING_TOP_RIGHT || + direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_RIGHT + ) { //右后 ttsContent = String.format(ttsContent, "右") alertContent = String.format(alertContent, "右") } @@ -693,17 +697,14 @@ class MogoPrivateObuManager private constructor() { when (status) { // 添加, add的时候,可能级别是2, ObuConstants.STATUS.ADD -> { - //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - direction, - "ACTION_V2X_FRONT_WARNING" - ) - //显示弹框,语音提示 Log.d( MogoObuConst.TAG_MOGO_OBU, "appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction" ) - mIMoGoWaringProvider!!.showWarningV2X( + //显示警告红边 + mIMoGoWaringProvider?.showWarning(direction) + //显示弹框,语音提示 + mIMoGoWaringProvider?.showWarningV2X( appId, alertContent, if (level == 3) ttsContent else "", @@ -720,10 +721,8 @@ class MogoPrivateObuManager private constructor() { // 删除 ObuConstants.STATUS.DELETE -> { isStrikeTts = false - //关闭警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - 0, "ACTION_V2X_FRONT_WARNING" - ) + // 关闭警告红边 + mIMoGoWaringProvider!!.showWarning(WarningDirectionEnum.ALERT_WARNING_NON) // 移除顶部弹窗 mIMoGoWaringProvider?.disableWarningV2X(appId.toString()) //更新周边车辆进行预警颜色变换,车辆实时移动和变色 @@ -735,9 +734,7 @@ class MogoPrivateObuManager private constructor() { // 更新 else -> { //显示警告红边 - mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection( - direction, "ACTION_V2X_FRONT_WARNING" - ) + mIMoGoWaringProvider?.showWarning(direction) if (!isStrikeTts) { AIAssist.getInstance(mContext).speakTTSVoice(ttsContent) isStrikeTts = true diff --git a/settings.gradle b/settings.gradle index 2d8844d295..8d1bf2e0b2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -64,3 +64,4 @@ include ':OCH:mogo-och-noop' include ':OCH:mogo-och' include ':modules:mogo-module-obu-mogo' include ':modules:mogo-module-hmi' +include ':modules:mogo-module-data'