This commit is contained in:
lixiaopeng
2021-10-14 15:56:19 +08:00
committed by 董宏宇
parent b1bb68d57b
commit 826534d1cb
2 changed files with 39 additions and 37 deletions

View File

@@ -198,9 +198,10 @@ class MogoPrivateObuManager private constructor() {
val level = info.threat_info.threat_level
val direction =
getMessageDirection(if (info.ext_info != null) info.ext_info.pos_classification else -1)
Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxRtiThreatIndInfo direction = $direction -- pos_classification = ${info.ext_info.pos_classification}")
Logger.d(
MogoObuConst.TAG_MOGO_OBU,
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type}"
"onCvxRtiThreatIndInfo appId = $appId --status = $status --level = $level -- handleDirection = $direction --rtiType = ${info.ext_info.rti_type} --direction = $direction -- pos_classification = ${info.ext_info.pos_classification} "
)
when (appId) {
// 道路危险情况预警
@@ -296,15 +297,15 @@ class MogoPrivateObuManager private constructor() {
}
// 前方拥堵提醒
EventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
alertContent = EventTypeEnum.getWarningContent(appId)
ttsContent = EventTypeEnum.getWarningContent(appId)
if (info.threat_info != null) {
if (info.threat_info.distance.toInt() != 0) {
ttsContent = String.format(
alertContent = String.format(
EventTypeEnum.getWarningTts(appId),
info.threat_info.distance.toInt()
)
} else {
ttsContent = "前方道路拥堵,减速慢行"
alertContent = "前方拥堵,减速慢行"
}
}
}
@@ -315,8 +316,9 @@ class MogoPrivateObuManager private constructor() {
ObuConstants.STATUS.ADD,
ObuConstants.STATUS.UPDATE// 更新
-> {
//显示警告红边
//显示警告红边 TODO 需要确定是什么值
CallerHmiManager.showWarning(direction)
//显示弹框,语音提示
CallerHmiManager.showWarningV2X(
appId.toInt(),
@@ -450,7 +452,7 @@ class MogoPrivateObuManager private constructor() {
MogoObuConst.TAG_MOGO_OBU,
"info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}"
)
CallerHmiManager.showLimitingVelocity((Math.ceil(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt())
CallerHmiManager.showLimitingVelocity((Math.round(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt())
}
}
// 删除
@@ -618,7 +620,7 @@ class MogoPrivateObuManager private constructor() {
isGreenLight = false
CallerHmiManager.showWarningTrafficLight(1)
val red = currentLight.count_down.toInt() + 1
val red = currentLight.count_down.toInt()
CallerHmiManager.changeCountdownRed(red)
CallerHmiManager.changeCountdownGreen(0)
CallerHmiManager.changeCountdownYellow(0)