[6.1.0]HdMap版本截取展示

This commit is contained in:
xuxinchao
2023-09-20 15:46:00 +08:00
parent 9b9d01bac9
commit 947acf4b83

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
@@ -375,9 +376,13 @@ class SystemVersionView @JvmOverloads constructor(
* HQ、M1 MAP350开始弃用其他车型MAP360开始弃用
*/
override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {
Log.i(TAG,"hdMapVer="+status.hdMapVer)
//hdMapVer返回示例/home/mogo/autopilot/share/hadmap_engine/data/hadmap_data/db.sqlite|bj|2.2.7|对bus路线上的junction进行修改对原609场景修改为6091、6092、6201、 6202四种细分场景并对通往园区路口改为619
if(status.hdMapVer!= null && status.hdMapVer.isNotEmpty()){
//对地图版本进行截取
AppConfigInfo.adHdMapVersion = status.hdMapVer.substringAfter("/hadmap_data/").substringBefore(".sqlite")
val city = status.hdMapVer.substringAfter(".sqlite|").substringBefore("|")
val version =status.hdMapVer.substringAfter("$city|").substringBefore("|")
AppConfigInfo.adHdMapVersion = "${city}_${version}"
updateAdHdMapVersion()
}
@@ -390,9 +395,13 @@ class SystemVersionView @JvmOverloads constructor(
* @param statusInf 数据
*/
override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {
Log.i(TAG,"hdMapVer="+statusInf.hdMapVer)
//hdMapVer返回示例/home/mogo/autopilot/share/hadmap_engine/data/hadmap_data/db.sqlite|bj|2.2.7|对bus路线上的junction进行修改对原609场景修改为6091、6092、6201、 6202四种细分场景并对通往园区路口改为619
if(statusInf.hdMapVer!= null && statusInf.hdMapVer.isNotEmpty()){
//对地图版本进行截取
AppConfigInfo.adHdMapVersion = statusInf.hdMapVer.substringAfter("/hadmap_data/").substringBefore(".sqlite")
val city = statusInf.hdMapVer.substringAfter(".sqlite|").substringBefore("|")
val version =statusInf.hdMapVer.substringAfter("$city|").substringBefore("|")
AppConfigInfo.adHdMapVersion = "${city}_${version}"
updateAdHdMapVersion()
}
}