From acdbd835d8b7b1abfc5fd3093bedd2eb87f51f53 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Fri, 18 Feb 2022 18:30:01 +0800 Subject: [PATCH] =?UTF-8?q?[Change]=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=A8=A1?= =?UTF-8?q?=E6=8B=9F=E5=BC=80=E5=90=AF=E8=87=AA=E5=8A=A8=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BF=E8=B0=83=E8=AF=95=EF=BC=8C=E4=BD=86?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=B7=A5=E6=8E=A7=E6=9C=BA=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20TODO=20=E4=B8=8B=E5=91=A8=E8=80=83=E8=99=91=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=BB=B4=E6=8A=A4=E7=8A=B6=E6=80=81=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/autopilot/MoGoAutopilotProvider.kt | 13 +++++++++++++ .../function/hmi/ui/setting/DebugSettingView.kt | 5 +++++ .../src/main/res/layout/view_debug_setting.xml | 10 ++++++++++ .../api/autopilot/IMoGoAutopilotProvider.kt | 8 ++++++++ .../call/autopilot/CallerAutoPilotManager.kt | 10 +++++++++- 5 files changed, 45 insertions(+), 1 deletion(-) 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 0cc39ed625..f9381ccf08 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 @@ -203,4 +203,17 @@ class MoGoAutopilotProvider : AdasManager.getInstance().disableDemoMode() } } + + /** + * 办公室调试使用,强制开启自动驾驶,将 status,pilotmode,control_pilotmode,强追设置为 1 + * isEnable = true 开启 + * isEnable = false 关闭 + */ + override fun setControlAutopilotCarAuto(isEnable: Boolean) { + if (isEnable) { + AdasManager.getInstance().controlAutopilotCarAuto() + } else { + AdasManager.getInstance().controlAutopilotCarHead() + } + } } \ No newline at end of file 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 b99e6b1030..1773a6acc2 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 @@ -304,6 +304,11 @@ class DebugSettingView @JvmOverloads constructor( SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.IS_DEMO_MODE, isChecked) } + // 模拟自动驾驶中 + tbChangeAutoPilotStatus.setOnCheckedChangeListener { buttonView, isChecked -> + CallerAutoPilotManager.setControlAutopilotCarAuto(isChecked) + } + tbSelfLog.setOnCheckedChangeListener { buttonView, isChecked -> if (isChecked) { LogUtils.getConfig().isLogSwitch = false 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 855965ce2a..fae006ce57 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 @@ -244,6 +244,16 @@ app:flexWrap="wrap" app:justifyContent="flex_start"> + +