增加了异常车辆全方位预警tts逻辑

This commit is contained in:
董宏宇
2021-09-13 14:27:37 +08:00
parent 42876f00a3
commit 58852ce8c8
3 changed files with 8 additions and 17 deletions

View File

@@ -43,8 +43,8 @@ enum class WarningTypeEnum(
TYPE_USECASE_ID_CLW(
ObuConstants.USE_CASE_ID.CLW,
"车辆失控预警",
"前车失控预警",
"小心前方失控车辆",
"%s失控预警",
"小心%s失控车辆",
R.drawable.icon_warning_v2x_vehicle_control
),
TYPE_USECASE_ID_DNPW(

View File

@@ -46,6 +46,6 @@ enum class WarningDirectionEnum(
),
ALERT_WARNING_ALL(
9,
"全方位"
"周边"
)
}

View File

@@ -571,7 +571,6 @@ class MogoPrivateObuManager private constructor() {
}
private var isStrikeTts = false
/**
@@ -621,17 +620,9 @@ class MogoPrivateObuManager private constructor() {
WarningTypeEnum.TYPE_USECASE_ID_CLW.useCaseId -> {
alertContent = WarningTypeEnum.getWarningContent(appId)
ttsContent = WarningTypeEnum.getWarningTts(appId)
// when (direction) {
// 3 -> { //左前
// ttsContent = String.format(ttsContent, "左")
// }
// 4 -> { //右前
// ttsContent = String.format(ttsContent, "右")
// }
// 1 -> { //正前
// ttsContent = alertContent
// }
// }
alertContent = String.format(alertContent, direction.desc)
ttsContent = String.format(ttsContent, direction.desc)
}
//左转辅助
@@ -711,10 +702,10 @@ class MogoPrivateObuManager private constructor() {
mIMoGoWaringProvider?.showWarningV2X(
appId,
alertContent,
if (level == 3) ttsContent else "",
if (level == 2||level == 3) ttsContent else "",
appId.toString()
)
if (level == 3) {
if (level == 2||level == 3) {
isStrikeTts = true
}
//更新周边车辆进行预警颜色变换,车辆实时移动和变色