[2.13.0_update]调整V2X消息存入消息盒子的时机
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user