From 4d0e57a25626a5939ad0331845f55fce7bd7ad49 Mon Sep 17 00:00:00 2001 From: lianglihui Date: Thu, 2 Dec 2021 17:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E9=80=9F=E9=A2=84=E8=AD=A6=20?= =?UTF-8?q?=E9=99=90=E9=80=9F=E5=80=BC=E4=BB=8E=E9=AB=98=E7=B2=BE=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E8=8E=B7=E5=8F=96=20=E4=B8=94=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../obu/mogo/MogoPrivateObuManager.kt | 45 ++++++++++--------- .../receiver/ObuRsuTestTriggerReceiver.kt | 20 ++++----- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt index 298f21b037..cb5619e798 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt @@ -458,28 +458,29 @@ class MogoPrivateObuManager private constructor() { // (5) 限速预警信息:CVX_SLW_THREAT_IND override fun onCvxSlwThreatIndInfo(info: CvxSlwThreatIndInfo?) { - Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxSlwThreatIndInfo ------> $info") - if (info != null) { - when (info.status) { - // 添加 - ObuConstants.STATUS.ADD, - ObuConstants.STATUS.UPDATE - -> { - if (info.ext_info != null) { - // 计算为千米每小时 TODO 这里需要做一下向上取整数,40,60,80,120等 - Logger.d( - MogoObuConst.TAG_MOGO_OBU, - "info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}" - ) - CallerHmiManager.showLimitingVelocity((Math.round(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt()) - } - } - // 删除 - ObuConstants.STATUS.DELETE -> { - CallerHmiManager.disableLimitingVelocity() - } - } - } + //todo 限速走高精地图 屏蔽OBU限速\ +// Logger.d(MogoObuConst.TAG_MOGO_OBU, "onCvxSlwThreatIndInfo ------> $info") +// if (info != null) { +// when (info.status) { +// // 添加 +// ObuConstants.STATUS.ADD, +// ObuConstants.STATUS.UPDATE +// -> { +// if (info.ext_info != null) { +// // 计算为千米每小时 TODO 这里需要做一下向上取整数,40,60,80,120等 +// Logger.d( +// MogoObuConst.TAG_MOGO_OBU, +// "info.ext_info.speed_limit_max ------> ${info.ext_info.speed_limit_max}" +// ) +// CallerHmiManager.showLimitingVelocity((Math.round(((info.ext_info.speed_limit_max * 60 * 60) / 1000) / 10) * 10).toInt()) +// } +// } +// // 删除 +// ObuConstants.STATUS.DELETE -> { +// CallerHmiManager.disableLimitingVelocity() +// } +// } +// } } diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt index 654d930274..ea7df77545 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt @@ -65,16 +65,16 @@ class ObuRsuTestTriggerReceiver : BroadcastReceiver() { .onCvxIvpThreatIndInfo(cvxIvpThreatIndInfo) } -// ObuConstants.USE_CASE_ID.SLW -> { //限速预警 -// val cvxSlwThreatIndInfo = CvxSlwThreatIndInfo(1, 1, 1L) -// val slwThreatExt = SlwThreatExt(1, 2, 6000, 2000) -// -// cvxSlwThreatIndInfo.ext_info = slwThreatExt -// cvxSlwThreatIndInfo.status = obuStatus -// -// MogoPrivateObuManager.INSTANCE.getMogoObuListener() -// .onCvxSlwThreatIndInfo(cvxSlwThreatIndInfo) -// } + ObuConstants.USE_CASE_ID.SLW -> { //限速预警 + val cvxSlwThreatIndInfo = CvxSlwThreatIndInfo(1, 1, 1L) + val slwThreatExt = SlwThreatExt(1, 2, 6000, 2000) + + cvxSlwThreatIndInfo.ext_info = slwThreatExt + cvxSlwThreatIndInfo.status = obuStatus + + MogoPrivateObuManager.INSTANCE.getMogoObuListener() + .onCvxSlwThreatIndInfo(cvxSlwThreatIndInfo) + } //弱势交通参与者碰撞预警,行人/摩托车碰撞预警 ObuConstants.USE_CASE_ID.VRUCW -> {