From 8000e565f412839252aec2e5d266b1d0736958b8 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 8 Dec 2021 18:19:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Upload]=201=E3=80=81=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=89=88=E6=9C=AC0.0.45=E3=80=81=202.1.3=202=E3=80=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=B0=8F=E5=9C=B0=E5=9B=BE=E6=8E=A7=E5=88=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=9A=90=E8=97=8F=20```=20//=20=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=B0=8F=E5=9C=B0=E5=9B=BE=20CallerSmpManager.hidePanel()=20//?= =?UTF-8?q?=20=E6=98=BE=E7=A4=BA=E5=B0=8F=E5=9C=B0=E5=9B=BE=20CallerSmpMan?= =?UTF-8?q?ager.showPanel()=20```?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../hmi/ui/setting/DebugSettingView.kt | 56 +++--- .../main/res/layout/view_debug_setting.xml | 10 ++ .../function/call/map/CallerSmpManager.kt | 18 +- gradle.properties | 160 +++++++++--------- 4 files changed, 139 insertions(+), 105 deletions(-) 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/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index 33aff7f3d0..b29e5f694f 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" /> + +