diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XWarningBroadcastReceiver.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XWarningBroadcastReceiver.kt index 654cd73d26..7eb5d55f3d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XWarningBroadcastReceiver.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/receiver/V2XWarningBroadcastReceiver.kt @@ -77,7 +77,13 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() { if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) { CallerHmiManager.showLimitingVelocity(1) } + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.V2X, + V2XMsg(v2xType.toString(), alertContent, ttsContent) + ) + ) CallerHmiManager.warningV2X(v2xType.toString(), alertContent, ttsContent, - tag, null, true, 5000L, MsgBoxType.V2X) + tag, null, true, 5000L) } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt index 00d0964f8d..4c49f58d58 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt @@ -378,7 +378,15 @@ class MogoPrivateObuManager private constructor() { //显示警告红边 TODO 需要确定是什么值 // CallerHmiManager.showWarning(direction) - //显示弹框,语音提示 + //不显示弹框,其它保留 + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(appId, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( appId, alertContent, @@ -391,8 +399,7 @@ class MogoPrivateObuManager private constructor() { } }, true, - 5000L, - MsgBoxType.OBU + 5000L ) // 更新数据 TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let { @@ -499,6 +506,14 @@ class MogoPrivateObuManager private constructor() { // if (level == 2 || level == 3) { //不考虑level //显示警告红边 CallerHmiManager.showWarning(direction) + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(v2xType, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( v2xType, alertContent, @@ -511,8 +526,7 @@ class MogoPrivateObuManager private constructor() { } }, true, - 5000L, - MsgBoxType.OBU + 5000L ) // } // 更新数据 @@ -707,10 +721,15 @@ class MogoPrivateObuManager private constructor() { 0x2 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT ttsContent = EventTypeEnum.getWarningTts(appId.toString()) alertContent = EventTypeEnum.getWarningContent(appId.toString()) + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(appId.toString(), alertContent, ttsContent) + ) + ) CallerHmiManager.warningV2X( appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - appId.toString(), null, true, 5000L, - MsgBoxType.OBU + appId.toString(), null, true, 5000L ) } 0x3 -> {//闯黄灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_YELLOW_LIGHT @@ -775,6 +794,14 @@ class MogoPrivateObuManager private constructor() { val maxSpeed = currentLight.glosa_suggested_speed_max.toInt() if (maxSpeed > 0) { + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, alertContent, @@ -782,8 +809,7 @@ class MogoPrivateObuManager private constructor() { appId.toString(), null, true, - 5000L, - MsgBoxType.OBU + 5000L ) } } @@ -899,8 +925,15 @@ class MogoPrivateObuManager private constructor() { "appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction" ) if (level == 2 || level == 3) { - // TODO:(只是不显示顶部弹窗,其它逻辑保留) - //显示弹框,语音提示 + //不显示顶部弹框,其它保留 + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(appId.toString(), + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( appId.toString(), alertContent, @@ -924,8 +957,7 @@ class MogoPrivateObuManager private constructor() { } }, true, - 5000L, - MsgBoxType.OBU + 5000L ) //显示警告红边 CallerHmiManager.showWarning(direction) diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index 4c737d8af9..f9aab04f50 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -392,7 +392,15 @@ class MogoPrivateObuNewManager private constructor() { -> { //显示警告红边 // CallerHmiManager.showWarning(direction) - //显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框 + //不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框 + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(appId, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( appId, alertContent, @@ -405,8 +413,7 @@ class MogoPrivateObuNewManager private constructor() { } }, true, - 3000L, - MsgBoxType.OBU + 3000L ) // 更新数据 TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let { @@ -471,6 +478,14 @@ class MogoPrivateObuNewManager private constructor() { // if (level == 2 || level == 3) { //不考虑level //显示警告红边 CallerHmiManager.showWarning(direction) + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(v2xType, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( v2xType, alertContent, @@ -483,8 +498,7 @@ class MogoPrivateObuNewManager private constructor() { } }, true, - 3000L, - MsgBoxType.OBU + 3000L ) // } // 更新数据 @@ -668,7 +682,15 @@ class MogoPrivateObuNewManager private constructor() { "appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction" ) if (level == 2 || level == 3) { - //显示弹框,语音提示 + //不显示弹框,其它保留 + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(appId, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( appId, alertContent, @@ -691,8 +713,7 @@ class MogoPrivateObuNewManager private constructor() { } }, true, - 3000L, - MsgBoxType.OBU + 3000L ) //显示警告红边 CallerHmiManager.showWarning(direction) @@ -779,9 +800,17 @@ class MogoPrivateObuNewManager private constructor() { 0x2 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT ttsContent = EventTypeEnumNew.getWarningTts(appId.toString()) alertContent = EventTypeEnumNew.getWarningContent(appId.toString()) + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(appId.toString(), + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( appId.toString(), alertContent, ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - appId.toString(), null, true, 3000L, MsgBoxType.OBU + appId.toString(), null, true, 3000L ) } 0x3 -> {//闯黄灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_YELLOW_LIGHT @@ -842,6 +871,14 @@ class MogoPrivateObuNewManager private constructor() { val maxSpeed = currentLight.suggestMaxSpeed if (maxSpeed > 0) { + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, + alertContent, + ttsContent) + ) + ) CallerHmiManager.warningV2X( EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, alertContent, @@ -849,8 +886,7 @@ class MogoPrivateObuNewManager private constructor() { appId.toString(), null, true, - 3000L, - MsgBoxType.OBU + 3000L ) } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt index dc3f3c1fe1..38bc5888a1 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt @@ -575,7 +575,15 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb } } } - // 显示弹框,语音提示 + // 不显示弹框,其它保留 + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.OBU, + V2XMsg(tempAppId.toString(), + tempContent, + tempTts) + ) + ) CallerHmiManager.warningV2X( tempAppId.toString(), tempContent, @@ -596,8 +604,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb } }, true, - 5000L, - MsgBoxType.V2X + 5000L ) CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(trafficData) } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java index 9f11092a54..8d1031e440 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java @@ -98,9 +98,17 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp V2XRoadEventEntity content = entity != null ? entity.getContent() : null; if (content != null) { // //显示警告红边 + CallerMsgBoxManager.INSTANCE.saveMsgBox( + new MsgBoxBean( + MsgBoxType.V2X, + new V2XMsg(content.getPoiType(), + content.getAlarmContent(), + content.getTts()) + ) + ); CallerHmiManager.INSTANCE.warningV2X(content.getPoiType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), - TimeUnit.SECONDS.toMillis(5), MsgBoxType.V2X); + TimeUnit.SECONDS.toMillis(5)); } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java index a091955b76..ec4f9c1864 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java @@ -57,10 +57,17 @@ public class V2XOptimalRouteVREventScenario if (entity != null) { V2XOptimalRouteDataRes content = entity.getContent(); if (content != null) { + CallerMsgBoxManager.INSTANCE.saveMsgBox( + new MsgBoxBean( + MsgBoxType.V2X, + new V2XMsg(entity.getType() + "", + "为您推荐最优路线", + "已为您选择最优路线") + ) + ); CallerHmiManager.INSTANCE.warningV2X(entity.getType() + "", "为您推荐最优路线", "已为您选择最优路线", TAG, - this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30), - MsgBoxType.V2X); + this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30)); } } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java index 0682923143..b53b27f6ea 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java @@ -63,10 +63,18 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL int v2xType = getV2XTypeForFrontWarning(mMarkerEntity); V2XMessageEntity entity = getV2XMessageEntity(); if (v2xType != 0) { + CallerMsgBoxManager.INSTANCE.saveMsgBox( + new MsgBoxBean( + MsgBoxType.V2X, + new V2XMsg(v2xType + "", + getAlertContentForFrontWarning(mMarkerEntity).toString(), + mMarkerEntity.getTts()) + ) + ); CallerHmiManager.INSTANCE.warningV2X(v2xType + "", getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), TAG, this, !entity.isOnlyShow(), - TimeUnit.SECONDS.toMillis(3), MsgBoxType.V2X); + TimeUnit.SECONDS.toMillis(3)); } } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt index 6d72796f41..40c412f93e 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt @@ -204,6 +204,14 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, private fun redLightWarning() { CallerLogger.d("$M_V2X$TAG", "=====闯红灯预警=====") ThreadUtils.runOnUiThread { + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.V2X, + V2XMsg(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, + EventTypeEnum.TYPE_USECASE_ID_IVP.content, + EventTypeEnum.TYPE_USECASE_ID_IVP.tts) + ) + ) CallerHmiManager.warningV2X( EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, EventTypeEnum.TYPE_USECASE_ID_IVP.content, @@ -211,8 +219,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, EventTypeEnum.TYPE_USECASE_ID_IVP.poiType, null, true, - 5000L, - MsgBoxType.V2X + 5000L ) } } @@ -232,6 +239,14 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType), speed ) + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.V2X, + V2XMsg(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, + content, + tts) + ) + ) CallerHmiManager.warningV2X( EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, content, @@ -239,8 +254,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener, EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType, null, true, - 5000L, - MsgBoxType.V2X + 5000L ) } } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt index 449357c729..507a6d9dfd 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt @@ -245,6 +245,14 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe ttsContent: String, tag: String ) { + CallerMsgBoxManager.saveMsgBox( + MsgBoxBean( + MsgBoxType.V2X, + V2XMsg(v2xType, + alertContent.toString(), + ttsContent) + ) + ) CallerHmiManager.warningV2X( v2xType, alertContent, ttsContent, tag, object : IMoGoWarningStatusListener { @@ -252,8 +260,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe override fun onDismiss() {} }, true, - 5000L, - MsgBoxType.V2X + 5000L ) } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt index 355c7d50a3..d382f96463 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt @@ -161,9 +161,7 @@ object CallerHmiManager : CallerBase() { listenerIMoGo: IMoGoWarningStatusListener?, playTts: Boolean, expireTime: Long = 5000L, - msgBoxType: MsgBoxType ) { - saveMsgBox(MsgBoxBean(msgBoxType, V2XMsg(v2xType, alertContent?.toString() ?: "", ttsContent))) waringProviderApi?.warningV2X( v2xType, alertContent,