增加施工的图标

This commit is contained in:
董宏宇
2021-08-24 17:22:32 +08:00
parent 187ce93343
commit f6bbe7d671
5 changed files with 11 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ adb shell am broadcast -a com.obu.test_trigger_recognized
// 红绿灯 0不可用1红灯2绿灯3黄灯
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei lightLevel 1 --ei obuLevel 3 --ei obuType 0x2B09 --ei rtiType 0x2
// 道路危险情况预警
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei obuLevel 3 --ei obuType 0x2B06 --ei rtiType 0x2
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei obuLevel 3 --ei obuType 0x2B06 --ei rtiType 0x7
// 弱势交通参与者
adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei obuLevel 3 --ei obuType 0X2B02 --ei ptcInfo 0x1

View File

@@ -65,8 +65,8 @@ enum class TrafficTypeEnum(
TYPE_TRAFFIC_ID_DAO_LU_SHI_GONG(
12,
"道路施工",
R.raw.v2x_daolushigong,
R.raw.v2x_daolushigong
R.raw.v2x_shigong_warning,
R.raw.v2x_shigong_warning
)
}

View File

@@ -105,6 +105,7 @@ class ObuRsuTestTriggerReceiver : BroadcastReceiver() {
ZoneInfo(1, 2000, 2000, listOf(position))
)
cvxRtiThreatIndInfo.rti_id = "123123"
cvxRtiThreatIndInfo.zones_info = zonesInfo
cvxRtiThreatIndInfo.threat_info = rtiThread
cvxRtiThreatIndInfo.ext_info = extInfo

View File

@@ -2,7 +2,7 @@ package com.mogo.module.obu.mogo.utils
import com.mogo.module.common.drawer.bean.TrafficData
import com.mogo.module.common.enums.TrafficTypeEnum
import com.mogo.module.common.enums.WarningTypeEnum
import com.mogo.utils.logger.Logger
import com.zhidao.support.obu.constants.ObuConstants
import com.zhidao.support.obu.model.CvxPtcThreatIndInfo
import com.zhidao.support.obu.model.CvxRtiThreatIndInfo
@@ -14,12 +14,14 @@ import com.zhidao.support.obu.model.CvxV2vThreatIndInfo
* @date 2021/8/18 2:30 下午
*/
object TrafficDataConvertUtils {
val TAG = "TrafficDataConvertUtils"
/**
* OBU 远车 转换交通元素数据
*/
fun cvxRvInfoIndInfo2TrafficData(info: CvxRvInfoIndInfo): TrafficData? {
if (info.basic_info == null || info.basic_info.position == null || info.threat_infos != null) {
Logger.e(TAG, "数据转换异常,请检查参数是否齐全")
return null
}
val trafficData = TrafficData()
@@ -43,10 +45,11 @@ object TrafficDataConvertUtils {
*/
fun cvxRtiThreatIndInfo2TrafficData(info: CvxRtiThreatIndInfo): TrafficData? {
// 这里只处理道路施工
if (info.threat_info.app_id != WarningTypeEnum.TYPE_USECASE_ID_IVS.useCaseId ||
if (info.rti_id == null || info.ext_info == null || info.ext_info.rti_type != 0x7 ||
info.zones_info == null || info.zones_info.first() == null
|| info.zones_info.first().path_points.first() == null
) {
Logger.e(TAG, "数据转换异常,请检查参数是否齐全")
return null
}
val trafficData = TrafficData()
@@ -64,6 +67,7 @@ object TrafficDataConvertUtils {
*/
fun cvxV2vThreatIndInfo2TrafficData(info: CvxV2vThreatIndInfo): TrafficData? {
if (info.basic_info == null || info.basic_info.position == null || info.threat_info == null) {
Logger.e(TAG, "数据转换异常,请检查参数是否齐全")
return null
}
val trafficData = TrafficData()
@@ -89,6 +93,7 @@ object TrafficDataConvertUtils {
*/
fun cvxPtcThreatIndInfo2TrafficData(info: CvxPtcThreatIndInfo): TrafficData? {
if (info.ptc_pos == null || info.threat_info == null) {
Logger.e(TAG, "数据转换异常,请检查参数是否齐全")
return null
}
val trafficData = TrafficData()