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 f6d0297c58..d039924888 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
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
import com.mogo.eagle.core.function.api.devatools.IOTAListener
import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener
+import com.mogo.eagle.core.function.api.setting.IMapShowNameListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
@@ -25,6 +26,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.och.CallerOchCustomViewManager
+import com.mogo.eagle.core.function.call.setting.CallerMapShowNameManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.tools.OfflineMapDialog
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog
@@ -68,7 +70,8 @@ class CarInfoTabView @JvmOverloads constructor(
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoCheckAutoPilotBtnListener,
- IMoGoAutopilotStatusListener, IMoGoDevaToolsListener, IDataCenterBizListener, IOTAListener {
+ IMoGoAutopilotStatusListener, IMoGoDevaToolsListener, IDataCenterBizListener, IOTAListener,
+ IMapShowNameListener {
companion object {
private const val TAG = "CarInfoTabView"
@@ -91,6 +94,7 @@ class CarInfoTabView @JvmOverloads constructor(
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerDevaToolsListenerManager.addListener(TAG, this)
CallerDataCenterBizListener.addListener(TAG, this)
+ CallerMapShowNameManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
@@ -99,6 +103,7 @@ class CarInfoTabView @JvmOverloads constructor(
CallerAutoPilotStatusListenerManager.removeListener(TAG)
CallerDevaToolsListenerManager.removeListener(TAG)
CallerDataCenterBizListener.removeListener(TAG)
+ CallerMapShowNameManager.removeListener(TAG)
}
private fun initView() {
@@ -248,8 +253,12 @@ class CarInfoTabView @JvmOverloads constructor(
private fun showCurrentAdVersion() {
UiThreadHandler.post {
- CallerAutoPilotStatusListenerManager.getDockerVersion()?.let {
- tvADVersionName.text = it
+ if(AppConfigInfo.mapShowName.isNotEmpty()){
+ tvADVersionName.text = AppConfigInfo.mapShowName
+ }else{
+ CallerAutoPilotStatusListenerManager.getDockerVersion()?.let {
+ tvADVersionName.text = it
+ }
}
}
}
@@ -356,4 +365,9 @@ class CarInfoTabView @JvmOverloads constructor(
}
}
+ override fun changeMapShowName(showName: String) {
+ super.changeMapShowName(showName)
+ showCurrentAdVersion()
+ }
+
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index 24319ddce9..abcca5fe3c 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -96,6 +96,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuInfoListenerManager
+import com.mogo.eagle.core.function.call.setting.CallerMapShowNameManager
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
@@ -337,6 +338,8 @@ import kotlin.collections.set
import kotlin.math.abs
import kotlin.system.exitProcess
import com.mogo.eagle.core.function.hmi.ui.tools.ShowDevicesManagerStateDialog
+import kotlinx.android.synthetic.main.view_debug_setting.view.btnEnsureMap
+import kotlinx.android.synthetic.main.view_debug_setting.view.etMapShowName
import kotlinx.android.synthetic.main.view_debug_setting.view.tbTileFileLog
@@ -597,6 +600,18 @@ internal class DebugSettingView @JvmOverloads constructor(
appVersionInfoLayout.visibility = View.GONE
}
}
+ //动态配置鹰眼显示MAP版本
+ if(AppConfigInfo.mapShowName.isEmpty()){
+ AppConfigInfo.mapShowName = CallerAutoPilotStatusListenerManager.getDockerVersion()+""
+ }
+ etMapShowName.setText(AppConfigInfo.mapShowName)
+ etMapShowName.text?.let { etMapShowName.setSelection(it.length) }
+ btnEnsureMap.setOnClickListener {
+ AppConfigInfo.mapShowName = etMapShowName.text.toString()
+ tvIpcVersionInfo.text = "MAP:${AppConfigInfo.mapShowName}"
+ tvIpcVersionInfoKey.text = "MAP:${AppConfigInfo.mapShowName}"
+ CallerMapShowNameManager.invokeMapShowName(AppConfigInfo.mapShowName)
+ }
/**
* 状态中心
@@ -2108,7 +2123,11 @@ internal class DebugSettingView @JvmOverloads constructor(
} else {
tvIpcProtocolVersionInfo.text = "工控机协议版本:${AppConfigInfo.protocolVersionNumber}"
}
- val dockerVersion = CallerAutoPilotStatusListenerManager.getDockerVersion()
+ val dockerVersion = if(AppConfigInfo.mapShowName.isNotEmpty() && AppConfigInfo.mapShowName!=CallerAutoPilotStatusListenerManager.getDockerVersion()){
+ AppConfigInfo.mapShowName
+ }else{
+ CallerAutoPilotStatusListenerManager.getDockerVersion()
+ }
tvIpcVersionInfo.text = "MAP:$dockerVersion"
tvIpcVersionInfoKey.text = "MAP:$dockerVersion"
tvMoGoMapVersion.text = "HD-Map版本:${DebugConfig.getMapVersion()}"
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt
index 922c5c7fa1..36882a73d0 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/VersionNameView.kt
@@ -3,11 +3,15 @@ package com.mogo.eagle.core.function.hmi.ui.widget
import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
+import android.util.Log
import android.view.LayoutInflater
import android.widget.LinearLayout
+import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
+import com.mogo.eagle.core.function.api.setting.IMapShowNameListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
+import com.mogo.eagle.core.function.call.setting.CallerMapShowNameManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.util.AppUtils
@@ -23,7 +27,7 @@ class VersionNameView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
-) : LinearLayout(context, attrs, defStyleAttr),IMoGoAutopilotStatusListener {
+) : LinearLayout(context, attrs, defStyleAttr),IMoGoAutopilotStatusListener, IMapShowNameListener {
companion object {
const val TAG = "VersionNameView"
@@ -64,7 +68,9 @@ class VersionNameView @JvmOverloads constructor(
@SuppressLint("SetTextI18n")
private fun showCurrentMapVersion() {
val old = tvMapVersionName?.text
- val version = dockerVersion
+ val version = AppConfigInfo.mapShowName.ifEmpty {
+ dockerVersion
+ }
if (!version.isNullOrEmpty() && old != version) {
scope.launch {
tvMapVersionName?.also {
@@ -78,11 +84,13 @@ class VersionNameView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
+ CallerMapShowNameManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerAutoPilotStatusListenerManager.removeListener(TAG)
+ CallerMapShowNameManager.removeListener(TAG)
}
override fun onAutopilotDockerInfo(dockerVersion: String) {
@@ -93,4 +101,9 @@ class VersionNameView @JvmOverloads constructor(
CallerDevaToolsManager.dockerVersion(dockerVersion)
}
+ override fun changeMapShowName(showName: String) {
+ super.changeMapShowName(showName)
+ showCurrentMapVersion()
+ }
+
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
index 06b854a1a6..6c391cab89 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
@@ -543,6 +543,45 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
+
+
+
+
+
+
+
+
() {
+
+ /**
+ * 工控机显示版本
+ * @param showName 展示版本
+ */
+ fun invokeMapShowName(showName: String){
+ M_LISTENERS.forEach{
+ val listener = it.value
+ listener.changeMapShowName(showName)
+ }
+ }
+
+}
\ No newline at end of file