[2.13.0_update]调整V2X消息存入消息盒子的时机

This commit is contained in:
chenfufeng
2022-11-28 14:56:05 +08:00
parent 0dda033608
commit 5f423d8ec0
10 changed files with 163 additions and 40 deletions

View File

@@ -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)
}

View File

@@ -98,9 +98,17 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> 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));
}
}

View File

@@ -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));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -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
)
}
}

View File

@@ -245,6 +245,14 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, 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<VipMessage>, IMoGoTrafficLightListe
override fun onDismiss() {}
},
true,
5000L,
MsgBoxType.V2X
5000L
)
}