2.13.0 优化obu 添加 限速预警逻辑

This commit is contained in:
lixiaopeng
2022-11-29 11:50:56 +08:00
parent a93206f221
commit 5a43448f0d

View File

@@ -363,7 +363,7 @@ class MogoPrivateObuNewManager private constructor() {
appId = V2iEventTypeEnum.TYPE_USECASE_ID_TJW.poiType
}
//限速预警 TODO
//限速预警, ADD处理一次
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
}
@@ -391,7 +391,7 @@ class MogoPrivateObuNewManager private constructor() {
// 添加
MogoObuConstants.STATUS.ADD -> {
if (appId == "1") { //限速预警 TODO
// CallerHmiManager.showLimitingVelocity((Math.round(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt())
CallerHmiManager.showLimitingVelocity((data.warningMsg[0].speedMaxLimit*3.6).toInt())
} else {
//显示警告红边
// CallerHmiManager.showWarning(direction)
@@ -422,30 +422,10 @@ class MogoPrivateObuNewManager private constructor() {
)
// 更新数据
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let {
// CallerMapUIServiceManager.getMarkerService()
// ?.updateITrafficThreatLevelInfo(it)
//显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
// CallerHmiManager.warningV2X(
// appId,
// alertContent,
// ttsContent,// 只有第一次才tts防止更新的时候不断的提醒
// (appId + direction.direction),//使用当前事件类型+方向记录tag当发生变化的时候关闭当前弹出新的
// object : IMoGoWarningStatusListener {
// override fun onDismiss() {
// // 关闭警告红边
// CallerHmiManager.showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
// }
// },
// true,
// 5000L
// )
// 更新数据
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let {
CallerMapUIServiceManager.getMarkerService()
?.updateITrafficThreatLevelInfo(it)
}
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let {
CallerMapUIServiceManager.getMarkerService()
?.updateITrafficThreatLevelInfo(it)
}
}
// }
}
@@ -597,9 +577,7 @@ class MogoPrivateObuNewManager private constructor() {
/**
* 地图匹配 是OBU算法输出地图匹配结果主车匹配道路哪条路或者哪条车道
*/
override fun onMogoObuMapMath(
data: MogoObuMapMathData?
) {
override fun onMogoObuMapMath(data: MogoObuMapMathData?) {
super.onMogoObuMapMath(data)
}
@@ -829,7 +807,7 @@ private fun handlerTrafficLight(appId: Int, status: Int, lights: List<SpatLight>
changeTrafficLightStatus(appId, lights)
}
// 删除
MogoObuConstants.STATUS.DELETE -> { //TODO 底层在修改,暂时没发送删除
MogoObuConstants.STATUS.DELETE -> {
// 移除顶部弹窗
CallerHmiManager.disableWarningTrafficLight()
CallerHmiManager.disableWarningV2X(appId.toString())