diff --git a/ZD_README/README_Call.md b/ZD_README/README_Call.md index 976e1dd41b..4c621778dc 100644 --- a/ZD_README/README_Call.md +++ b/ZD_README/README_Call.md @@ -31,6 +31,13 @@ changeCurrentIcon : 修改自车3D模型 changeMaoViewAngle : 修改地图视角 ``` +* ### 小地图 MAP 图层 相关 -> [CallerSmpManager.kt][DebugSettingView.kt] -> [Demo][DebugSettingView.kt] + +``` +showPanel() : 显示小地图 +hidePanel() : 隐藏小地图 +``` + * ### 域控制器 相关 -> [CallerAutoPilotManager.kt][DebugSettingView.kt] -> [Demo][DebugSettingView.kt] ``` diff --git a/config.gradle b/config.gradle index 6ad9fa789d..40a47ed033 100644 --- a/config.gradle +++ b/config.gradle @@ -156,9 +156,9 @@ ext { mogoserviceapi : "com.mogo.service:mogo-service-api:${MOGO_SERVICE_API_VERSION}", moduleapps : "com.mogo.module:module-apps:${MOGO_MODULE_APPS_VERSION}", moduleextensions : "com.mogo.module:module-extensions:${MOGO_MODULE_EXTENSIONS_VERSION}", - chat : "com.mogo.module.carchatout:module-chat:${MOGO_MODULE_CHAT_VERSION}", - callchat : "com.mogo.module.carchatout:module-carchatting:${MOGO_MODULE_CARCHATTING_VERSION}", - callchatprovider : "com.mogo.module.carchatout:module-carchatting-provider:${MOGO_MODULE_CARCHATTINGPROVIDER_VERSION}", + chat : "com.mogo.module.carchatim:module-chat:${MOGO_MODULE_CHAT_VERSION}", + callchat : "com.mogo.module.carchatim:module-carchatting:${MOGO_MODULE_CARCHATTING_VERSION}", + callchatprovider : "com.mogo.module.carchatim:module-carchatting-provider:${MOGO_MODULE_CARCHATTINGPROVIDER_VERSION}", // V2X moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}", 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 ca8a5bf68d..69d03baac8 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 @@ -209,12 +209,13 @@ class MoGoHmiFragment : MvpFragment val notificationView = V2XNotificationView(it) notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString())) - - notificationView.setWarningContent( - alertContent ?: EventTypeEnum.getWarningContent( - v2xType.toString() - ) - ) + val warningContent = alertContent ?: EventTypeEnum.getWarningContent(v2xType.toString()) + if (warningContent.isNullOrEmpty()) { + Logger.e(TAG, "Show warningContent is null or empty!") + return + } else { + notificationView.setWarningContent(warningContent) + } if (mWarningFloat != null && mWarningFloat!!.config.floatTag != tag) { WarningFloat.dismiss(mWarningFloat!!.config.floatTag, true) 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 b520c24664..c26ec087a7 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 @@ -26,6 +26,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListe import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.map.CallerHDMapManager import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager +import com.mogo.eagle.core.function.call.map.CallerSmpManager 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 @@ -49,11 +50,11 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.* * 展示 本机、网络、工控机、OBU等状态信息,支持设置IP,等参数进行调试 */ class DebugSettingView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 + context: Context, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0 ) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener, - IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener { + IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener { private val TAG = "DebugSettingView" @@ -132,7 +133,7 @@ class DebugSettingView @JvmOverloads constructor( tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString() tvAutopilotInfo.text = - CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString() + CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString() // 初始化App 配置信息 val appConfigInfo = AppConfigInfo() @@ -150,7 +151,7 @@ class DebugSettingView @JvmOverloads constructor( // 初始化OBU IP信息 val ipAddress = - SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199") + SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199") etObuIP.setText(ipAddress) etObuIP.text?.let { etObuIP.setSelection(it.length) } @@ -172,18 +173,18 @@ class DebugSettingView @JvmOverloads constructor( // 初始化 GSP数据源 数据 rgGpsProvider.check( - when (FunctionBuildConfig.gpsProvider) { - 0 -> { - R.id.rbGpsProviderAndroid + when (FunctionBuildConfig.gpsProvider) { + 0 -> { + R.id.rbGpsProviderAndroid + } + 1 -> { + R.id.rbGpsProviderRTK + } + 2 -> { + R.id.rbGpsProviderOBU + } + else -> R.id.rbGpsProviderAndroid } - 1 -> { - R.id.rbGpsProviderRTK - } - 2 -> { - R.id.rbGpsProviderOBU - } - else -> R.id.rbGpsProviderAndroid - } ) rgGpsProvider.setOnCheckedChangeListener { group, checkedId -> when (checkedId) { @@ -201,14 +202,14 @@ class DebugSettingView @JvmOverloads constructor( // 初始化 感知数据是否绘制 选择情况 rgIsDrawIdentifyData.check( - when (FunctionBuildConfig.isDrawIdentifyData) { - true -> { - R.id.rbDraw + when (FunctionBuildConfig.isDrawIdentifyData) { + true -> { + R.id.rbDraw + } + false -> { + R.id.rbDoNotDraw + } } - false -> { - R.id.rbDoNotDraw - } - } ) rgIsDrawIdentifyData.setOnCheckedChangeListener { group, checkedId -> when (checkedId) { @@ -277,6 +278,13 @@ class DebugSettingView @JvmOverloads constructor( CallerAutoPilotManager.setIsWriteLog(true) } } + tbControlView.setOnCheckedChangeListener { buttonView, isChecked -> + if (isChecked) { + CallerSmpManager.hidePanel() + } else { + CallerSmpManager.showPanel() + } + } } /** diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml index 599d5fc18c..0759c0cf14 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml @@ -37,10 +37,11 @@ android:id="@+id/flVipIdentificationView" android:layout_width="@dimen/module_vip_width" android:layout_height="@dimen/module_vip_height" - android:layout_marginLeft="@dimen/module_vip_margin_left" + android:layout_marginStart="@dimen/module_vip_margin_left" + android:layout_marginTop="@dimen/module_vip_margin_top" android:visibility="gone" - app:layout_constraintLeft_toRightOf="@+id/viewSpeedChart" - app:layout_constraintTop_toTopOf="@+id/viewSpeedChart" /> + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + +