diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9f6f97a3a6..37fc2ab8e9 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
index 8282a2b0be..91c053f9b1 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt
@@ -44,7 +44,7 @@ class MoGoHmiFragment : MvpFragment
.setTag("DebugSettingView")
.setLayout(debugSettingView)
.setSidePattern(SidePattern.RIGHT)
- .setGravity(Gravity.RIGHT, offsetY = 80)
+ .setGravity(Gravity.RIGHT, offsetY = 70)
.setImmersionStatusBar(true)
.setAnimator(object : DefaultAnimator() {
override fun enterAnim(
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 7b9574563c..c2ab39e8e8 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
@@ -4,14 +4,19 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
-import com.mogo.eagle.core.data.constants.MoGoOBUConfig
+import com.mogo.cloud.passport.MoGoAiCloudClient
+import com.mogo.eagle.core.data.app.AppConfigInfo
+import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.hmi.R
+import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
+import com.mogo.map.MogoMap
+import com.mogo.utils.network.utils.GsonUtil
import com.mogo.utils.storage.SharedPrefsMgr
import kotlinx.android.synthetic.main.view_debug_setting.view.*
@@ -47,6 +52,26 @@ class DebugSettingView @JvmOverloads constructor(
private fun initView() {
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfo()
+
+ // 初始化App 配置信息
+ val appConfigInfo = AppConfigInfo()
+ appConfigInfo.appName = AppUtils.getAppName()
+ appConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
+ appConfigInfo.appVersionName = AppUtils.getAppVersionName()
+ appConfigInfo.appPackageName = AppUtils.getAppPackageName()
+ appConfigInfo.devicesSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
+ appConfigInfo.mapVersion = MogoMap.getInstance().mogoMap.mapVersion
+
+ // 将数据绘制
+ tvAppInfo.text = GsonUtil.jsonFromObject(appConfigInfo)
+
+ // 初始化OBU IP信息
+ val ipAddress =
+ SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
+
+ etObuIP.setText(ipAddress)
+ etObuIP.text?.let { etObuIP.setSelection(it.length) }
+
btnSetObuIP.setOnClickListener {
val obuIP = etObuIP.text.toString()
if (obuIP.isNotEmpty()) {
@@ -57,10 +82,11 @@ class DebugSettingView @JvmOverloads constructor(
}
}
+ /**
+ * OBU状态回调
+ */
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
- etObuIP.setText(obuStatusInfo.connectIP)
- etObuIP.text?.let { etObuIP.setSelection(it.length) }
}
}
\ 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 a47576a327..95001345bc 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
@@ -1,8 +1,7 @@
-
-
+
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+ android:orientation="vertical">
+
diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt
index 5cb8cb8936..fc1159114e 100644
--- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt
+++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MoGoObuProvider.kt
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.obu.mogo
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
-import com.mogo.eagle.core.data.constants.MoGoOBUConfig
+import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.function.api.obu.IMoGoObuProvider
import com.mogo.eagle.core.utilcode.util.LogUtils
import com.mogo.service.MogoServicePaths
@@ -22,14 +22,14 @@ class MoGoObuProvider : IMoGoObuProvider {
LogUtils.dTag(TAG, "初始化蘑菇自研OBU……")
mContext = context
val ipAddress =
- SharedPrefsMgr.getInstance(context).getString(MoGoOBUConfig.OBU_IP, "192.168.1.199")
+ SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
}
override fun connect(ipAddress: String) {
mContext?.let {
// 保存本地OBU IP地址
- SharedPrefsMgr.getInstance(it).putString(MoGoOBUConfig.OBU_IP, ipAddress)
+ SharedPrefsMgr.getInstance(it).putString(MoGoConfig.OBU_IP, ipAddress)
MogoPrivateObuManager.INSTANCE.connectObu(it, ipAddress)
}
}
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt
new file mode 100644
index 0000000000..ea5d82f0f2
--- /dev/null
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/AppConfigInfo.kt
@@ -0,0 +1,37 @@
+package com.mogo.eagle.core.data.app
+
+/**
+ * @author xiaoyuzhou
+ * @date 2021/10/12 2:46 下午
+ * 当前应用的配置信息
+ */
+class AppConfigInfo {
+
+ /*应用基本信息*/
+ var appName: String? = null
+ var appVersionCode = 0
+ var appVersionName: String? = null
+ var appPackageName: String? = null
+ var devicesSN: String? = null
+
+ /*依赖的SDK版本信息*/
+ var mapVersion: String? = null
+
+ /*应用配置信息,这里的配置将影响功能,用来替换productFlavors配置的那种编译渠道*/
+ // GPS数据提供源: 0-Android系统,1-工控机,2-OBU
+ var GPS_PROVIDER = 1
+
+ // 是否在地图上绘制感知元素
+ // 网络下发 false--不绘制,true--绘制
+ var TRAFFIC_PROVIDER_NET_STATUS = false
+
+ // 域控制器 false--不绘制,true--绘制
+ var TRAFFIC_PROVIDER_AUTOPILOT_STATUS = true
+
+ // OBU false--不绘制,true--绘制
+ var TRAFFIC_PROVIDER_OBU_STATUS = false
+
+ // 进入应用的地图模式。0-2D模式,1-VR模式
+ var MAP_STYLE_MODE = 1
+
+}
\ No newline at end of file
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoOBUConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt
similarity index 56%
rename from core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoOBUConfig.kt
rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt
index b643234223..386f0c21e5 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoOBUConfig.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MoGoConfig.kt
@@ -5,6 +5,11 @@ package com.mogo.eagle.core.data.constants
* @date 2021/10/11 8:24 下午
* OBU 配置常量
*/
-object MoGoOBUConfig {
+object MoGoConfig {
+ // 自研OBU IP地址
const val OBU_IP = "OBU_IP"
+
+ // 域控制器 IP地址
+ const val AUTOPILOT_IP = "AUTOPILOT_IP"
+
}
\ No newline at end of file