diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index 82504edac8..a061335ede 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -26,6 +26,7 @@ import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.autopilot.*
import com.mogo.eagle.core.data.config.FunctionBuildConfig
+import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_BAG_RECORD
@@ -1136,6 +1137,13 @@ class DebugSettingView @JvmOverloads constructor(
}
}
+ /**
+ * 限速数据,优先使用obu,默认打开
+ */
+ tbRoadLimitSpeed.setOnCheckedChangeListener { _, isChecked ->
+ HmiBuildConfig.isShowObuLimitSpeedView = !isChecked
+ }
+
/**
* 实时加速度面板控制
*/
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
index 6a2021f4bd..b8a2f334e9 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
@@ -1379,6 +1379,17 @@
android:textOn="关闭云端弱势群体预警"
android:textSize="@dimen/dp_24" />
+
+
${data.status}"
)
@@ -552,7 +554,9 @@ class MogoPrivateObuNewManager private constructor() {
// CallerMapUIServiceManager.getMarkerService()
// ?.updateITrafficInfo(it)
// }
+
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)?.let {
+ CallerLogger.d("$M_OBU${TAG_MOGO_OBU}", "cvxPtcThreatIndInfo2TrafficData ---it---> $it")
CallerMapUIServiceManager.getMarkerService()
?.updateITrafficThreatLevelInfo(it)
}
@@ -585,21 +589,28 @@ class MogoPrivateObuNewManager private constructor() {
*/
override fun onMogoObuMapMath(data: MogoObuMapMathData?) {
super.onMogoObuMapMath(data)
- if (data != null) {
- CallerLogger.d(
- "$M_OBU${TAG_MOGO_OBU}",
- "onMogoObuMapMathstatus = ${data.status} --speedMaxLimit = ${Math.round((data.speedMaxLimit*3.6))}")
- when (data.status) {
- MogoObuConstants.STATUS.ADD -> { // 添加
- CallerHmiManager.showLimitingVelocity(Math.round((data.speedMaxLimit*3.6)).toInt())
- }
+ if(isShowObuLimitSpeedView) { //默认显示obu的限速
+ if (data != null) {
+ CallerLogger.d(
+ "$M_OBU${TAG_MOGO_OBU}",
+ "onMogoObuMapMathstatus = ${data.status} --speedMaxLimit = ${Math.round((data.speedMaxLimit*3.6))}")
+ when (data.status) {
+ MogoObuConstants.STATUS.ADD -> { // 添加
+ UiThreadHandler.post {
+ if(data.speedMaxLimit > 0) {
+ CallerHmiManager.showLimitingVelocity(Math.round((data.speedMaxLimit*3.6)).toInt())
+ }
+ }
+ }
- MogoObuConstants.STATUS.UPDATE -> { // 更新
+ MogoObuConstants.STATUS.UPDATE -> { // 更新
+ }
- }
-
- MogoObuConstants.STATUS.DELETE -> { // 删除
- CallerHmiManager.disableLimitingVelocity()
+ MogoObuConstants.STATUS.DELETE -> { // 删除
+ UiThreadHandler.post {
+ CallerHmiManager.disableLimitingVelocity()
+ }
+ }
}
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/speedlimit/SpeedLimitDataManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/speedlimit/SpeedLimitDataManager.java
index bb2fd2e7b8..15769c64cc 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/speedlimit/SpeedLimitDataManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/speedlimit/SpeedLimitDataManager.java
@@ -1,9 +1,11 @@
package com.mogo.eagle.core.function.v2x.speedlimit;
+import static com.mogo.eagle.core.data.config.HmiBuildConfig.isShowObuLimitSpeedView;
import static com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.BIZ_SLW;
import static com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.V2I;
import android.location.Location;
+import android.util.Log;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
@@ -52,13 +54,15 @@ public class SpeedLimitDataManager implements IMogoCarLocationChangedListener2 {
@BizConfig(biz = V2I,dependentBizNode = "",bizNode = BIZ_SLW)
private void getSpeedLimit() {
- int speedLimit = MogoMapUIController.getInstance().getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), mLocation.getBearing());
- UiThreadHandler.post(() -> {
- if (speedLimit > 0) {
- CallerHmiManager.INSTANCE.showLimitingVelocity(speedLimit);
- CallLimitingVelocityListenerManager.INSTANCE.invokeOnLimitingVelocityChange(speedLimit);
- }
- });
+ if (!isShowObuLimitSpeedView) {
+ int speedLimit = MogoMapUIController.getInstance().getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), mLocation.getBearing());
+ UiThreadHandler.post(() -> {
+ if (speedLimit > 0) {
+ CallerHmiManager.INSTANCE.showLimitingVelocity(speedLimit);
+ CallLimitingVelocityListenerManager.INSTANCE.invokeOnLimitingVelocityChange(speedLimit);
+ }
+ });
+ }
}
}
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt
index a0ace656e0..b626dab4b5 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt
@@ -92,4 +92,12 @@ object HmiBuildConfig {
@JvmField
@Volatile
var isShowCloudWeaknessTrafficView = false
+
+ /**
+ * 是否展示obu的限速
+ */
+ @JvmField
+ @Volatile
+ var isShowObuLimitSpeedView = true
+
}
\ No newline at end of file