From 5fdea95846ebf5f54d1bc47efddb06d5603c66fb Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Tue, 14 Jun 2022 17:22:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 司机屏增加重启工控机节点按钮 --- .../core/function/autopilot/MoGoAutopilotProvider.kt | 8 ++++++++ .../core/function/hmi/ui/setting/DebugSettingView.kt | 10 ++++++++++ .../src/main/res/layout/view_debug_setting.xml | 10 ++++++++++ .../function/api/autopilot/IMoGoAutopilotProvider.kt | 5 +++++ .../function/call/autopilot/CallerAutoPilotManager.kt | 7 +++++++ 5 files changed, 40 insertions(+) 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 15936d38ab..5a33c42d23 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 @@ -371,6 +371,14 @@ class MoGoAutopilotProvider : } } + /** + * 发送工控机所有节点重启命令 + */ + override fun sendIpcReboot() { + //重启所有节点 + AdasManager.getInstance().sendSystemCmdReq(MessagePad.SystemCmdType.SYSTEMCMD_REBOOT) + } + /** * 办公室调试使用,强制开启自动驾驶,将 status,pilotMode,control_pilotMode,强追设置为 1 * isEnable = 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 4c27d10957..761a899330 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 @@ -553,6 +553,16 @@ class DebugSettingView @JvmOverloads constructor( tbIsRainMode.visibility = View.GONE } + //重启工控机所有节点 + btnIpcReboot.onClick{ + CallerAutoPilotManager.sendIpcReboot() + ToastUtils.showLong("重启命令已发送") + } + //只在司机端设置工控机节点重启功能 + if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){ + btnIpcReboot.visibility = View.GONE + } + // 强制绘制引导线 tbIsDrawAutopilotTrajectoryData.setOnCheckedChangeListener { _, isChecked -> FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = isChecked 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 9b56b57e6a..5eaf4b5011 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 @@ -232,6 +232,16 @@ android:textSize="@dimen/dp_24" android:background="@drawable/radio_button_normal_background_right"/> +