[2.13.0-arch-opt] fix obu bug of list is null
This commit is contained in:
@@ -45,16 +45,17 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation project(':libraries:mogo-obu')
|
||||
implementation project(':libraries:mogo-adas')
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation project(':libraries:mogo-obu')
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(":foudations:mogo-aicloud-services-sdk")
|
||||
implementation project(":tts:tts-base")
|
||||
implementation project(':core:mogo-core-data')
|
||||
} else {
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
@@ -62,6 +63,8 @@ dependencies {
|
||||
kapt rootProject.ext.dependencies.androidxroomcompiler
|
||||
implementation rootProject.ext.dependencies.androidxroomktx
|
||||
|
||||
implementation project(':libraries:mogo-obu')
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation rootProject.ext.dependencies.mogoaicloudtelematic
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(":foudations:mogo-commons")
|
||||
|
||||
@@ -154,11 +154,14 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
if (HmiBuildConfig.isShowObuV2vView) {
|
||||
if (data.warningMsg != null) {
|
||||
// 更新数据,远车数据,之前要匹配uuid
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data.vehBasicsMsg)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficLocationInfo(it)
|
||||
}
|
||||
data.vehBasicsMsg?.let {
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(it)
|
||||
?.let { data ->
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(data)
|
||||
}
|
||||
}.also {
|
||||
CallerLogger.e("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", "cvxRvInfoIndInfo2TrafficData 数据转换异常,请检查参数是否齐全")
|
||||
}
|
||||
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", data.toString())
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
@@ -952,7 +955,12 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
* 保存obu直连数据到消息盒子
|
||||
*/
|
||||
private fun saveObuData(type: String, content: String, tts: String) {
|
||||
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(type, content, tts, DataSourceType.OBU)
|
||||
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(
|
||||
type,
|
||||
content,
|
||||
tts,
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,9 +6,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.support.obu.ObuBase
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.mogo.support.obu.model.MogoObuRsiWarningData
|
||||
import com.mogo.support.obu.model.MogoObuRsmWarningData
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData
|
||||
|
||||
/**
|
||||
* @description 自研obu数据转换
|
||||
@@ -23,10 +20,6 @@ object TrafficDataConvertUtilsNew {
|
||||
* OBU 远车 转换交通元素数据,是否需要
|
||||
*/
|
||||
fun cvxRvInfoIndInfo2TrafficData(info: ObuBase.VehicleBasics): TrafficData? {
|
||||
if (info == null) {
|
||||
CallerLogger.e("$M_OBU$TAG", "cvxRvInfoIndInfo2TrafficData 数据转换异常,请检查参数是否齐全")
|
||||
return null
|
||||
}
|
||||
val trafficData = TrafficData()
|
||||
trafficData.type = TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE
|
||||
trafficData.uuid = info.id
|
||||
@@ -59,7 +52,7 @@ object TrafficDataConvertUtilsNew {
|
||||
* OBU 预警事件 转换交通元素数据 他车预警
|
||||
*/
|
||||
fun cvxV2vThreatIndInfo2TrafficData(info: ObuScene.RvWarningData): TrafficData? {
|
||||
if (info?.vehBasicsMsg == null || info.warningMsg == null) {
|
||||
if (info.vehBasicsMsg == null || info.warningMsg == null) {
|
||||
CallerLogger.e("$M_OBU$TAG", "数据转换异常,请检查参数是否齐全")
|
||||
return null
|
||||
}
|
||||
@@ -70,7 +63,7 @@ object TrafficDataConvertUtilsNew {
|
||||
trafficData.heading = info.vehBasicsMsg.heading
|
||||
trafficData.speed = info.vehBasicsMsg.speed
|
||||
// 判断车辆V2X预警级别,调整车辆颜色
|
||||
if (info.warningMsg.warningDataList != null) {
|
||||
if (info.warningMsg.warningDataList != null && info.warningMsg.warningDataList.size > 0) {
|
||||
trafficData.threatLevel = info.warningMsg.warningDataList[0].warningLevel
|
||||
} else {
|
||||
trafficData.threatLevel = 1
|
||||
@@ -123,7 +116,7 @@ object TrafficDataConvertUtilsNew {
|
||||
}
|
||||
|
||||
// 判断车辆V2X预警级别,调整车辆颜色
|
||||
if (info.warningMsg != null && info.warningMsg.warningDataList != null) {
|
||||
if (info.warningMsg != null && info.warningMsg.warningDataList != null && info.warningMsg.warningDataList.size > 0) {
|
||||
trafficData.threatLevel = info.warningMsg.warningDataList[0].warningLevel
|
||||
} else {
|
||||
trafficData.threatLevel = 1
|
||||
|
||||
Reference in New Issue
Block a user