[V2X]鬼探头道路预警逻辑优化

This commit is contained in:
renwj
2022-05-06 20:05:34 +08:00
parent 4e003df875
commit e4121da473
15 changed files with 37 additions and 28 deletions

View File

@@ -73,6 +73,6 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
CallerHmiManager.showLimitingVelocity(1)
}
CallerHmiManager.showWarningV2X(v2xType, alertContent, ttsContent, tag, null, true, 5000L)
CallerHmiManager.showWarningV2X(v2xType.toString(), alertContent, ttsContent, tag, null, true, 5000L)
}
}

View File

@@ -464,14 +464,14 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
/**
* 展示VR下V2X预警
*
* @param v2xType V2X类型
* @param poiType V2X类型
* @param alertContent 提醒文本
* @param ttsContent tts语音播报消息
* @param tag tag绑定弹窗的标志
*/
@Synchronized
override fun showWarningV2X(
v2xType: Int,
v2xType: String,
alertContent: CharSequence?,
ttsContent: String?,
tag: String?,
@@ -487,9 +487,9 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
if (floatWindow == null || TextUtils.isEmpty(showTag) || !floatWindow.isShow() || floatWindow.config.floatTag != tag) {
// 代理View初始化了才可以弹窗
mViewNotification?.let { notificationView ->
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString()))
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType))
val warningContent = alertContent
?: EventTypeEnum.getWarningContent(v2xType.toString())
?: EventTypeEnum.getWarningContent(v2xType)
if (warningContent.isEmpty()) {
CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!")
return@launchWhenResumed