[dev_arch_opt_3.0] 添加必要的日志

This commit is contained in:
lixiaopeng
2023-02-27 15:19:45 +08:00
parent 6af8c12967
commit 9777008d46
4 changed files with 29 additions and 15 deletions

View File

@@ -242,6 +242,9 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
when (status) {
// 添加
MogoObuConstants.STATUS.ADD -> {
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
saveObuToDcData(appId, alertContent, ttsContent)
showWarning(appId, alertContent, ttsContent, direction)
}
@@ -502,6 +505,9 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
"${M_OBU}${TAG}",
"MogoObuDcCombineManager changeTrafficLightStatus 闯红灯 --------> ttsContent = $ttsContent ---alertContent = $alertContent "
)
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
saveObuToDcData(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent)
showWarning(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent, WarningDirectionEnum.ALERT_WARNING_NON)
}
@@ -539,6 +545,9 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
)
val maxSpeed = currentLight.suggestMaxSpeed * 3.6
if (maxSpeed > 0) {
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
saveObuToDcData(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, alertContent, ttsContent)
showWarning(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, alertContent, ttsContent, WarningDirectionEnum.ALERT_WARNING_NON)
}

View File

@@ -1037,8 +1037,6 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
)
}
private val ttsMap = mutableMapOf<String, Long>()
/**
* 消息盒子对应消息的语音播报
*/
@@ -1048,19 +1046,6 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
tts: String,
direction: WarningDirectionEnum
) {
//30秒内同一个事件只出现一次 TODO 临时添加,后面宏宇统一在数据中心处理
if (ttsMap.containsKey(type)) {
var oldTime = ttsMap[type]
var timeDiff = (System.currentTimeMillis() - oldTime!!) / 1000
if (timeDiff < 30) {
return
}
ttsMap.remove(type)
ttsMap[type] = System.currentTimeMillis()
} else {
ttsMap[type] = System.currentTimeMillis()
}
CallerHmiManager.warningV2X(
type,
content,