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">
+
+