优化急转弯

This commit is contained in:
董宏宇
2021-08-20 19:48:35 +08:00
parent 22134acf33
commit 3280c2a52f

View File

@@ -178,10 +178,21 @@ class MogoPrivateObuManager private constructor() {
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxRoadTrafficInfoIndInfo ------> $info")
info?.let {
var appId = 0
val direction =
getOtherObjDirection(if (!info.threat_exts.isNullOrEmpty()) info.threat_exts[0].pos_classification else 7)
when (info.rti_type) {
//急转弯
0x2 -> {
appId = ObuConstants.USE_CASE_ID.IVS
// 特殊处理左、右方向的
when (direction) {
3 -> {
appId = 0x2C02
}
4 -> {
appId = 0x2C03
}
}
}
//施工
0x7 -> {
@@ -224,11 +235,13 @@ class MogoPrivateObuManager private constructor() {
ObuConstants.STATUS.ADD -> {
//显示警告红边
mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection(
getOtherObjDirection(if (!info.threat_exts.isNullOrEmpty()) info.threat_exts[0].pos_classification else 7),
direction,
"ACTION_V2X_FRONT_WARNING"
)
val ttsContent = WarningTypeEnum.getWarningTts(appId)
val alertContent = WarningTypeEnum.getWarningContent(appId)
mIMoGoWaringProvider!!.showWarningV2X(
appId,
alertContent,
@@ -361,7 +374,12 @@ class MogoPrivateObuManager private constructor() {
val appId = info.threat_info.app_id
val level = info.threat_info.threat_level
val status = info.status
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxV2vThreatIndInfo getMessageDirection(direction) = ${getMessageDirection(direction)}")
Logger.d(
MogoObuConst.TAG_MOGO_OBU,
"onCvxV2vThreatIndInfo getMessageDirection(direction) = ${
getMessageDirection(direction)
}"
)
handleSdkObu(appId, getMessageDirection(direction), status, level, info)
}
}