diff --git a/ZD_README/README_Call.md b/ZD_README/README_Call.md index c675586dfd..192070bfd2 100644 --- a/ZD_README/README_Call.md +++ b/ZD_README/README_Call.md @@ -33,6 +33,13 @@ changeCurrentIcon : 修改自车3D模型 changeMaoViewAngle : 修改地图视角 ``` +* ### 小地图 MAP 图层 相关 -> [CallerSmpManager.kt][DebugSettingView.kt] -> [Demo][DebugSettingView.kt] + +``` +showPanel() : 显示小地图 +hidePanel() : 隐藏小地图 +``` + * ### 域控制器 相关 -> [CallerAutoPilotManager.kt][DebugSettingView.kt] -> [Demo][DebugSettingView.kt] ``` 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 031a3bc97e..4c0eee3727 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/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index 8d7789a508..98d8b17085 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 @@ -91,6 +91,16 @@ android:textOn="显示「工具箱」" android:textSize="@dimen/dp_34" /> + +