From 14bcc09d3eb075ec29cde3588422cf3fe16a2c1c Mon Sep 17 00:00:00 2001 From: donghongyu Date: Thu, 17 Feb 2022 15:49:14 +0800 Subject: [PATCH] =?UTF-8?q?[Change]=20=E5=A2=9E=E5=8A=A0=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=BA=94=E7=94=A8=E5=90=8C=E6=AD=A5=E7=BE=8E=E5=8C=96?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/autopilot/MoGoAutopilotProvider.kt | 3 +++ .../function/hmi/ui/setting/DebugSettingView.kt | 15 +++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) 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 246965e9cd..8ccd07aaf3 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 @@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.autopilot.adapter.MoGoAdasListenerImpl import com.mogo.eagle.core.function.autopilot.adapter.MoGoAdasMsgConnectStatusListenerImpl import com.mogo.eagle.core.function.autopilot.adapter.MoGoHandAdasMsgManager import com.mogo.eagle.core.function.autopilot.server.AsyncDataToAutopilotServer +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr @@ -70,6 +71,8 @@ class MoGoAutopilotProvider : AdasManager.getInstance().setOnAdasListener(MoGoAdasListenerImpl()) // 同步数据给工控机的服务 AsyncDataToAutopilotServer.INSTANCE.initServer() + // 同步是否开启美化模式 + CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) } /** 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 9ae24adbf7..8fc44ed188 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 @@ -64,8 +64,8 @@ class DebugSettingView @JvmOverloads constructor( private var logInfoView: LogInfoView? = null private var logViewAttach = false - private var mAutoPilotStatusInfo: AutopilotStatusInfo?=null - private var mAutoPilotCarStateInfo: AutopilotCarStateInfo?=null + private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null + private var mAutoPilotCarStateInfo: AutopilotCarStateInfo? = null init { LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true) @@ -280,18 +280,13 @@ class DebugSettingView @JvmOverloads constructor( } // 演示模式,上一次勾选的数据 - val isDemoMode = - SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.IS_DEMO_MODE, false) - CallerAutoPilotManager.setDemoMode(isDemoMode) - tbIsDemoMode.isChecked = isDemoMode - if (isDemoMode){ - FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true - } + tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode + // 演示模式 tbIsDemoMode.setOnCheckedChangeListener { buttonView, isChecked -> CallerAutoPilotManager.setDemoMode(isChecked) FunctionBuildConfig.isDemoMode = isChecked - if (!FunctionBuildConfig.isDemoMode){ + if (!FunctionBuildConfig.isDemoMode) { FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false } SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.IS_DEMO_MODE, isChecked)