diff --git a/.idea/misc.xml b/.idea/misc.xml
index 2d8d39b655..c192b717ce 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -21,6 +21,8 @@
+
+
diff --git a/README.md b/README.md
index 352d6eb8f6..dc4a9f75dc 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ adb shell am broadcast -a com.hmi.v2x.limitingvelocity --ez limitingVelocityIsSh
adb shell am broadcast -a com.hmi.v2x.limitingvelocity --ez limitingVelocityIsShow false
// 控制OBU场景自测
-adb shell am broadcast -a com.obu.test_trigger --ei obuType 0x2A01 --ei obuStates 1
+adb shell am broadcast -a com.obu.test_trigger --ei obuStates 1 --ei obuLevel 3 --ei obuType 0x2A01
diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoObuConst.java b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoObuConst.java
index cb0f4f7a44..e68dcd1ad8 100644
--- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoObuConst.java
+++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoObuConst.java
@@ -17,5 +17,7 @@ public class MogoObuConst {
public static String BROADCAST_OBU_TYPE_EXTRA_KEY = "obuType";
// 场景操作状态,ObuConstants.STATUS
public static String BROADCAST_OBU_STATES_EXTRA_KEY = "obuStates";
+ // 场景预警等级,2-弹窗,3-弹窗+tts+地图绘制
+ public static String BROADCAST_OBU_LEVEL_EXTRA_KEY = "obuLevel";
}
diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt
index 23e955b7fc..33e97454a6 100644
--- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt
+++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt
@@ -253,33 +253,29 @@ class MogoPrivateObuManager private constructor() {
info?.let {
//预警信息,预警类型 threat_level 3
info.threat_info?.let {
- if (info.threat_info.threat_level > 1) {
- //预警方位
- val direction = info.ext_info.target_classification
- //显示警告红边
- mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection(
- getMessageDirection(direction),
- "ACTION_V2X_FRONT_WARNING"
- )
-
- //处理预警类型
- val appId = info.threat_info.app_id
- Logger.d(
- MogoObuConst.TAG_MOGO_OBU,
- "direction = " + direction + "----" + getMessageDirection(
- direction
- ) + "--appId = " + appId
- )
- handleSdkObu(
- info.vehicle_id,
- appId,
- info.threat_info.threat_level,
- getMessageDirection(direction),
- info.status,
- info.basic_info
- )
- // 这里不主动添加元素,原因是onCvxRvInfoIndInfo中会展示周边车,只用修改对应的车辆位置即可
- }
+ //预警方位
+ val direction = info.ext_info.target_classification
+ //显示警告红边
+ mMogoServiceApis!!.v2XListenerManager.warningChangedForListenerWithDirection(
+ getMessageDirection(direction),
+ "ACTION_V2X_FRONT_WARNING"
+ )
+ //处理预警类型
+ val appId = info.threat_info.app_id
+ Logger.d(
+ MogoObuConst.TAG_MOGO_OBU,
+ "direction = " + direction + "----" + getMessageDirection(
+ direction
+ ) + "--appId = " + appId
+ )
+ handleSdkObu(
+ info.vehicle_id,
+ appId,
+ info.threat_info.threat_level,
+ getMessageDirection(direction),
+ info.status,
+ info.basic_info
+ )
}
}
}
diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt
index 63afe34c99..7a1590272c 100644
--- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt
+++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuTestTriggerReceiver.kt
@@ -34,6 +34,7 @@ class ObuTestTriggerReceiver : BroadcastReceiver() {
*/
val obuType = intent.getIntExtra(MogoObuConst.BROADCAST_OBU_TYPE_EXTRA_KEY, 0)
val obuStatus = intent.getIntExtra(MogoObuConst.BROADCAST_OBU_STATES_EXTRA_KEY, 0)
+ val obuLevel = intent.getIntExtra(MogoObuConst.BROADCAST_OBU_LEVEL_EXTRA_KEY, 3)
Logger.d(
TAG, "obuType:$obuType obuStatus:$obuStatus"
)
@@ -48,7 +49,7 @@ class ObuTestTriggerReceiver : BroadcastReceiver() {
// 构建测试数据
val cvxV2vThreatIndInfo = CvxV2vThreatIndInfo(1, 1, 1L)
- val v2vThreat = V2vThreat(1, obuType, null, 1000, 2, 100)
+ val v2vThreat = V2vThreat(1, obuType, null, 1000, obuLevel, 100)
cvxV2vThreatIndInfo.threat_info = v2vThreat
val v2vThreatExt =