[dev_arch_opt_3.0] 临时添加obu相关tts和消息的展示频率
This commit is contained in:
@@ -1037,6 +1037,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
)
|
||||
}
|
||||
|
||||
private val ttsMap = mutableMapOf<String, Long>()
|
||||
|
||||
/**
|
||||
* 消息盒子对应消息的语音播报
|
||||
*/
|
||||
@@ -1046,6 +1048,19 @@ 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