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

This commit is contained in:
chenfufeng
2021-09-14 10:41:45 +08:00
parent d68497cefd
commit ba0f775546
3 changed files with 8 additions and 17 deletions

View File

@@ -145,8 +145,8 @@ enum class EventTypeEnum(
ObuConstants.USE_CASE_ID.CLW.toString(),
"车辆失控预警",
poiTypeSrcVr=R.drawable.icon_warning_v2x_vehicle_control,
content="失控预警",
tts="小心前方失控车辆"
content="%s失控预警",
tts="小心%s失控车辆"
),
TYPE_USECASE_ID_DNPW(
ObuConstants.USE_CASE_ID.DNPW.toString(),

View File

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

View File

@@ -567,7 +567,6 @@ class MogoPrivateObuManager private constructor() {
}
private var isStrikeTts = false
/**
@@ -617,17 +616,9 @@ class MogoPrivateObuManager private constructor() {
EventTypeEnum.TYPE_USECASE_ID_CLW.poiType -> {
alertContent = EventTypeEnum.getWarningContent(appId.toString())
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
// 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)
}
//左转辅助
@@ -707,10 +698,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
}
//更新周边车辆进行预警颜色变换,车辆实时移动和变色