modify hint
This commit is contained in:
@@ -30,7 +30,7 @@ enum class WarningTypeEnum(
|
||||
ObuConstants.USE_CASE_ID.FCW,
|
||||
"前向碰撞预警",
|
||||
"前车碰撞预警",
|
||||
"前车碰撞预警",
|
||||
"小心前车",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_ICW(
|
||||
@@ -44,42 +44,42 @@ enum class WarningTypeEnum(
|
||||
ObuConstants.USE_CASE_ID.CLW,
|
||||
"车辆失控预警",
|
||||
"前车失控预警",
|
||||
"%s前车失控预警",
|
||||
"小心前方失控车辆",
|
||||
R.drawable.icon_warning_v2x_vehicle_control
|
||||
),
|
||||
TYPE_USECASE_ID_DNPW(
|
||||
ObuConstants.USE_CASE_ID.DNPW,
|
||||
"逆向超车预警",
|
||||
"逆向超车预警",
|
||||
"注意逆向车道车辆",
|
||||
"注意对向来车",
|
||||
R.drawable.icon_warning_v2x_reverse_overtaking
|
||||
),
|
||||
TYPE_USECASE_ID_AVW(
|
||||
ObuConstants.USE_CASE_ID.AVW,
|
||||
"异常车辆提醒",
|
||||
"前车异常",
|
||||
"%s前车辆异常",
|
||||
"小心前方异常车辆",
|
||||
R.drawable.icon_warning_v2x_abnormal_vehicle
|
||||
),
|
||||
TYPE_USECASE_ID_BSW(
|
||||
ObuConstants.USE_CASE_ID.BSW,
|
||||
"盲区预警",
|
||||
"盲区预警",
|
||||
"%s后盲区预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_blind_area_collision
|
||||
),
|
||||
TYPE_USECASE_ID_LCW(
|
||||
ObuConstants.USE_CASE_ID.LCW,
|
||||
"变道预警",
|
||||
"变道预警",
|
||||
"%s后变道预警",
|
||||
"%s向变道预警",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_reverse_overtaking
|
||||
),//注意左后车辆/注意右后车辆
|
||||
TYPE_USECASE_ID_EVW(
|
||||
ObuConstants.USE_CASE_ID.EVW,
|
||||
"紧急车辆提醒",
|
||||
"请避让特种车辆",
|
||||
"后方存在特殊车辆,请安排避让",
|
||||
"后方特种车辆请避让",
|
||||
R.drawable.icon_warning_v2x_special_vehicle_access
|
||||
),
|
||||
TYPE_USECASE_ID_VRUCW_PERSON(
|
||||
@@ -100,28 +100,28 @@ enum class WarningTypeEnum(
|
||||
ObuConstants.USE_CASE_ID.SLW,
|
||||
"限速预警",
|
||||
"已超速",
|
||||
"已超速",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_over_speed
|
||||
),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
ObuConstants.USE_CASE_ID.LTA,
|
||||
"左转辅助",
|
||||
"左转碰撞预警",
|
||||
"注意左前车辆",
|
||||
"注意%s后车辆",
|
||||
R.drawable.icon_warning_v2x_collision_warning
|
||||
),
|
||||
TYPE_USECASE_ID_HLW(
|
||||
ObuConstants.USE_CASE_ID.HLW,
|
||||
"道路危险情况预警",
|
||||
"道路危险情况预警",
|
||||
"前方路况危险",
|
||||
"前方路况危险,小心行驶",
|
||||
R.drawable.icon_warning_v2x_road_dangerous
|
||||
),//(如果能给出具体的类别,则播报具体危险类别)
|
||||
TYPE_USECASE_ID_IVS(
|
||||
ObuConstants.USE_CASE_ID.IVS,
|
||||
"车内标牌",
|
||||
"前方施工",
|
||||
"前方施工",
|
||||
"",
|
||||
R.drawable.icon_warning_v2x_road_construction
|
||||
),
|
||||
TYPE_USECASE_ID_TJW(
|
||||
@@ -142,7 +142,7 @@ enum class WarningTypeEnum(
|
||||
0x2B091,
|
||||
"绿波通行",
|
||||
"绿波通行 %s km/h",
|
||||
"保持车速 %s 公里每小时,可直接通过路口",
|
||||
"前方路口建议车速 %s 公里每小时",
|
||||
R.drawable.icon_warning_v2x_traffic_lights_green
|
||||
),
|
||||
TYPE_USECASE_ID_COC(
|
||||
|
||||
@@ -563,8 +563,10 @@ class MogoPrivateObuManager private constructor() {
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
if (direction == 5) {
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
alertContent = String.format(alertContent, "左")
|
||||
} else if (direction == 6) else {
|
||||
ttsContent = String.format(ttsContent, "右")
|
||||
alertContent = String.format(alertContent, "右")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -572,16 +574,27 @@ 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
|
||||
}
|
||||
// when (direction) {
|
||||
// 3 -> { //左前
|
||||
// ttsContent = String.format(ttsContent, "左")
|
||||
// }
|
||||
// 4 -> { //右前
|
||||
// ttsContent = String.format(ttsContent, "右")
|
||||
// }
|
||||
// 1 -> { //正前
|
||||
// ttsContent = alertContent
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
//左转辅助
|
||||
WarningTypeEnum.TYPE_USECASE_ID_LTA.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
if (direction == 5) {
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
} else if (direction == 6) else {
|
||||
ttsContent = String.format(ttsContent, "右")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,28 +602,30 @@ class MogoPrivateObuManager private constructor() {
|
||||
WarningTypeEnum.TYPE_USECASE_ID_AVW.useCaseId -> {
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
when (direction) {
|
||||
3 -> { //左前
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
}
|
||||
4 -> { //右前
|
||||
ttsContent = String.format(ttsContent, "右")
|
||||
}
|
||||
1 -> { //正前
|
||||
ttsContent = alertContent
|
||||
}
|
||||
}
|
||||
// when (direction) {
|
||||
// 3 -> { //左前
|
||||
// ttsContent = String.format(ttsContent, "左")
|
||||
// }
|
||||
// 4 -> { //右前
|
||||
// ttsContent = String.format(ttsContent, "右")
|
||||
// }
|
||||
// 1 -> { //正前
|
||||
// ttsContent = alertContent
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
//盲区预警
|
||||
WarningTypeEnum.TYPE_USECASE_ID_BSW.useCaseId -> {
|
||||
ttsContent = WarningTypeEnum.getWarningTts(appId)
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
if (direction == 5) { //左后
|
||||
ttsContent = String.format(ttsContent, "左")
|
||||
alertContent = String.format(alertContent, "左")
|
||||
} else if (direction == 6) else { //右后
|
||||
ttsContent = String.format(ttsContent, "右")
|
||||
alertContent = String.format(alertContent, "右")
|
||||
}
|
||||
alertContent = WarningTypeEnum.getWarningContent(appId)
|
||||
}
|
||||
|
||||
// 这里处理固定的提示信息
|
||||
|
||||
Reference in New Issue
Block a user