From 00ef4cca6df19afa9a1c8843b8ea63c26fb5cbb9 Mon Sep 17 00:00:00 2001 From: xuxinchao <13522809046@163.com> Date: Mon, 18 Apr 2022 18:19:35 +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 增加ADAS日志输出状态初始化状态 --- .../core/function/autopilot/MoGoAutopilotProvider.kt | 7 +++++++ .../core/function/hmi/ui/setting/DebugSettingView.kt | 3 +++ .../function/api/autopilot/IMoGoAutopilotProvider.kt | 5 +++++ .../call/autopilot/CallerAutoPilotManager.kt | 12 ++++++++++++ 4 files changed, 27 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 f203fb848f..e5b0eca86a 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 @@ -294,6 +294,13 @@ class MoGoAutopilotProvider : CupidLogUtils.setEnableLog(isEnableLog) } + /** + * ADAS日志开启状态 + */ + override fun isEnableLog(): Boolean { + return CupidLogUtils.isEnableLog() + } + override fun onDestroy() { CallerMapDataCollectorManager.unRegisterOnMapCollectTaskListener(this) } 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 2525e72797..59c077946a 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 @@ -599,6 +599,9 @@ class DebugSettingView @JvmOverloads constructor( tbChangeCurrentCarIcon.isChecked = true } + //初始化ADAS日志开关状态 + tbADASLog.isChecked = CallerAutoPilotManager.isEnableLog() + } /** diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt index cc1a667a12..eee345e182 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt @@ -86,6 +86,11 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider { */ fun setEnableLog(isEnableLog: Boolean) + /** + * ADAS日志开启状态 + */ + fun isEnableLog(): Boolean + /** * speed单位:km/h */ diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index 06091631a8..406446d35c 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -91,10 +91,22 @@ object CallerAutoPilotManager { providerApi?.stopRecord(type, id) } + /** + * 设置是否开启ADAS日志 + * @param isEnableLog 是否开启日志 + */ fun setEnableLog(isEnableLog: Boolean) { providerApi?.setEnableLog(isEnableLog) } + /** + * ADAS日志开启状态 + */ + fun isEnableLog(): Boolean{ + return providerApi?.isEnableLog()?:false + } + + /** * speed单位:km/h */