From 82c740d67d9ec1035a141ec9bc53fd7782b0e2bf Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Tue, 21 Feb 2023 10:38:40 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20=E6=B7=BB=E5=8A=A0ob?= =?UTF-8?q?u=E9=80=9A=E8=BF=87=E5=B7=A5=E6=8E=A7=E6=9C=BA=E9=80=9A?= =?UTF-8?q?=E9=81=93=EF=BC=8C=E7=BA=A2=E7=BB=BF=E7=81=AF=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=9A=84=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/obu/MogoObuDcCombineManager.kt | 35 ++++++++----------- .../obu/MogoPrivateObuNewManager.kt | 21 ++++++----- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index 4eb626a00a..d97e5a1c5d 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -247,11 +247,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener MogoObuConstants.STATUS.ADD -> { saveObuToDcData(appId, alertContent, ttsContent) showWarning(appId, alertContent, ttsContent, direction) - // 更新数据,是否需要 -// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)?.let { -// CallerMapUIServiceManager.getMarkerService() -// ?.updateITrafficThreatLevelInfo(it) -// } } MogoObuConstants.STATUS.UPDATE -> { // 更新 @@ -261,14 +256,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener MogoObuConstants.STATUS.DELETE -> { // 关闭警告红边 CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_NON) - // 更新数据,删除标牌? -// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData) -// ?.let { -// // 事件结束,还原车辆颜色 -// it.threatLevel = 0x01 -// CallerMapUIServiceManager.getMarkerService() -// ?.updateITrafficInfo(it) -// } } } } @@ -285,14 +272,19 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener ) // 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu if (rsmWarningData != null && rsmWarningData.participant != null) { - var v2xType = if (rsmWarningData.participant.ptcType == 1) { //机动车 - EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType - } else if (rsmWarningData.participant.ptcType == 2) { //非机动车 - EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType - } else if (rsmWarningData.participant.ptcType == 3) { //行人 - EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType - } else { //未知 - EventTypeEnumNew.TYPE_ERROR.poiType + var v2xType = when (rsmWarningData.participant.ptcType) { + 1 -> { //机动车 + EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType + } + 2 -> { //非机动车 + EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType + } + 3 -> { //行人 + EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType + } + else -> { //未知 + EventTypeEnumNew.TYPE_ERROR.poiType + } } val ttsContent = EventTypeEnumNew.getWarningTts(v2xType) val alertContent = @@ -470,6 +462,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener MogoObuConstants.STATUS.DELETE -> { // 移除顶部弹窗,当收不到信号的时候触发一次 CallerTrafficLightListenerManager.disableTrafficLight() + CallerTrafficLightListenerManager.invokeTrafficLightDisapper() isShowGreenWave = false isShowRunRedLight = false } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index 9c814152eb..3dcdaea07f 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -437,14 +437,19 @@ class MogoPrivateObuNewManager private constructor() { if (HmiBuildConfig.isShowObuWeaknessTrafficView) { // 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu if (data != null && data.participant != null) { - var v2xType = if (data.participant.ptcType == 1) { //机动车 - EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType - } else if (data.participant.ptcType == 2) { //非机动车 - EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType - } else if (data.participant.ptcType == 3) { //行人 - EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType - } else { //未知 - EventTypeEnumNew.TYPE_ERROR.poiType + var v2xType = when (data.participant.ptcType) { + 1 -> { //机动车 + EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType + } + 2 -> { //非机动车 + EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType + } + 3 -> { //行人 + EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType + } + else -> { //未知 + EventTypeEnumNew.TYPE_ERROR.poiType + } } val ttsContent = EventTypeEnumNew.getWarningTts(v2xType) val alertContent = EventTypeEnumNew.getWarningContent(v2xType)