[dev_arch_opt_3.0] 添加必要的日志
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user