From a895a8ae31e8592ee527fe46ea41f879ba713d61 Mon Sep 17 00:00:00 2001 From: EmArrow Date: Thu, 10 Oct 2024 21:21:36 +0800 Subject: [PATCH 1/2] [6.7.0] fix bug of car tab --- .../function/hmi/bone/tab/CarInfoTabView.kt | 22 ++---- .../CallerAutoPilotStatusListenerManager.kt | 75 ++++++++++++++----- 2 files changed, 60 insertions(+), 37 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt index 52f1ebc8c0..17bac941a4 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt @@ -216,6 +216,9 @@ class CarInfoTabView @JvmOverloads constructor( private fun updateAdHdMapVersion() { if (AppConfigInfo.adHdMapVersion.isNotEmpty()) { UiThreadHandler.post { + if(tvADMapVersion.text.contains(AppConfigInfo.adHdMapVersion)){ + return@post + } tvADMapVersion.text = tvADMapVersion.text.toString() + AppConfigInfo.adHdMapVersion } } @@ -223,15 +226,7 @@ class CarInfoTabView @JvmOverloads constructor( override fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) { CallerLogger.i(SceneConstant.M_HMI + 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()) { - //对地图版本进行截取 - val city = status.hdMapVer.substringAfter(".sqlite|").substringBefore("|") - val version = status.hdMapVer.substringAfter("$city|").substringBefore("|") - AppConfigInfo.adHdMapVersion = "${city}_${version}" - updateAdHdMapVersion() - } - + updateAdHdMapVersion() } /** @@ -242,14 +237,7 @@ class CarInfoTabView @JvmOverloads constructor( */ override fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) { CallerLogger.i(SceneConstant.M_HMI + 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()) { - //对地图版本进行截取 - val city = statusInf.hdMapVer.substringAfter(".sqlite|").substringBefore("|") - val version = statusInf.hdMapVer.substringAfter("$city|").substringBefore("|") - AppConfigInfo.adHdMapVersion = "${city}_${version}" - updateAdHdMapVersion() - } + updateAdHdMapVersion() } } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index a9cdb83b1e..083ef6f411 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -1,14 +1,11 @@ package com.mogo.eagle.core.function.call.autopilot +import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLine import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo -import com.mogo.eagle.core.data.msgbox.MsgBoxBean -import com.mogo.eagle.core.data.msgbox.MsgBoxType -import com.mogo.eagle.core.data.msgbox.SSMMsg import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.base.CallerBase -import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.call.trace.CallerTrace import com.mogo.eagle.core.utilcode.util.GsonUtils import com.zhjt.mogo.adas.data.AdasConstants @@ -36,7 +33,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase if (oldValue != newValue) { CallerTrace.write("AutoPilotStatusFromCan", mapOf("AutoPilotStatusFromCan" to newValue)) @@ -159,7 +175,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase + this.statusInfo = status + if (AppConfigInfo.adHdMapVersion.isEmpty() && status.hdMapVer != null && status.hdMapVer.isNotEmpty()) { + //对地图版本进行截取 + val city = status.hdMapVer.substringAfter(".sqlite|").substringBefore("|") + val version = status.hdMapVer.substringAfter("$city|").substringBefore("|") + AppConfigInfo.adHdMapVersion = "${city}_${version}" + } M_LISTENERS.forEach { itx -> val listener = itx.value - listener.onAutopilotStatusRespByQuery(it) + listener.onAutopilotStatusRespByQuery(status) } } } @@ -293,6 +321,13 @@ object CallerAutoPilotStatusListenerManager : CallerBase val listener = itx.value listener.onSystemStatus(it) @@ -315,7 +350,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase Date: Thu, 10 Oct 2024 21:23:33 +0800 Subject: [PATCH 2/2] [6.7.0] add log --- .../com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt index 17bac941a4..d2c564aec8 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/CarInfoTabView.kt @@ -215,6 +215,7 @@ class CarInfoTabView @JvmOverloads constructor( private fun updateAdHdMapVersion() { if (AppConfigInfo.adHdMapVersion.isNotEmpty()) { + CallerLogger.i(SceneConstant.M_HMI + TAG, "updateAdHdMapVersion, adHdMapVersion:${AppConfigInfo.adHdMapVersion} , text:${tvADMapVersion.text}") UiThreadHandler.post { if(tvADMapVersion.text.contains(AppConfigInfo.adHdMapVersion)){ return@post