diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 363922b59a..13d7dac84d 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -207,6 +207,13 @@ class MoGoAutopilotProvider : }, 1000, TimeUnit.MILLISECONDS) } + /** + * 断开与工控机的连接 + */ + override fun disconnectIpc() { + AdasManager.getInstance().disconnect() + } + override fun onMapCollectStart(cmdId: Int, cmdTime: Long) { val result = recordPackage(2, cmdId) CallerLogger.d("$M_ADAS_IMPL$TAG", "开始记录包: [$cmdId, $result]") 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 cd25df7a14..0bf25f12fd 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 @@ -396,9 +396,6 @@ class DebugSettingView @JvmOverloads constructor( //日志中心事件点击监听 setLogCheckedChangeListener() - - - //OBU配置信息 tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString() @@ -527,6 +524,10 @@ class DebugSettingView @JvmOverloads constructor( } } + //断开与工控机的连接 + btnDisconnectIpc.setOnClickListener { + CallerAutoPilotManager.disconnectIpc() + } updateSpeedSettingViews() @@ -966,7 +967,7 @@ class DebugSettingView @JvmOverloads constructor( } override fun upgradeVersionUrls(urls: Map?) { - //todo 版本信息更新 + } }) 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 d74b47cd8a..e6e28ae6db 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 @@ -604,13 +604,28 @@ app:layout_constraintTop_toTopOf="@id/btnSetAutopilotIP" app:layout_constraintBottom_toBottomOf="@id/btnSetAutopilotIP" app:layout_constraintLeft_toRightOf="@id/btnSetAutopilotIP" - app:layout_constraintRight_toRightOf="parent" + app:layout_constraintRight_toLeftOf="@id/btnDisconnectIpc" android:layout_marginStart="@dimen/dp_30" - android:layout_marginEnd="@dimen/dp_30" + android:layout_marginEnd="@dimen/dp_20" android:layout_marginTop="@dimen/dp_10" android:layout_marginBottom="@dimen/dp_10" /> +