From 9fd2aca1fb240a3a865691487fc2a67e794fa97b Mon Sep 17 00:00:00 2001 From: renwj Date: Fri, 10 Mar 2023 12:09:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20=E8=A7=86?= =?UTF-8?q?=E8=A7=92=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E7=9B=91=E5=90=AC=E8=B7=AF=E5=8F=A3=E5=8F=8A?= =?UTF-8?q?=E5=81=9C=E6=AD=A2=E7=BA=BF=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo_core_function_devatools/DevaToolsProvider.kt | 4 ++++ .../core/function/call/map/CallerVisualAngleManager.kt | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt index 0e4b4aa983..c653f4bca4 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/DevaToolsProvider.kt @@ -16,6 +16,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneTAG import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider import com.mogo.eagle.core.function.api.devatools.apm.* +import com.mogo.eagle.core.function.call.map.* import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.zhjt.mogo_core_function_devatools.apm.* import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager @@ -67,6 +68,9 @@ class DevaToolsProvider : IDevaToolsProvider { FuncConfigImpl.init() MogoLogCatchManager.init(mContext!!) + // 视角切换功能初始化,监听路口及停止线回调 + CallerVisualAngleManager.init() + //升级(鹰眼/工控)与监控服务 iPCReportManager.initServer() moFangManager.init(mContext!!) diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt index 75c5a5f04e..f306c91abd 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt @@ -1,5 +1,6 @@ package com.mogo.eagle.core.function.call.map +import android.util.Log import com.alibaba.android.arouter.launcher.* import com.mogo.eagle.core.data.constants.* import com.mogo.eagle.core.function.api.map.angle.* @@ -17,6 +18,13 @@ object CallerVisualAngleManager { @Volatile private var isVisualAngleChanged = false + fun init() { + provider?.let { + Log.d("CallerVisualAngle", "--- init ---") + } + } + + fun changeAngle(scene: Scene) { provider?.changeAngle(scene) } From 7da4c650425d812a27b396cef7fa9ad834912f83 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Fri, 10 Mar 2023 12:18:12 +0800 Subject: [PATCH 2/2] [2.13.0-arch-opt] fix bug of map light --- .../eagle/core/function/view/MapBizView.kt | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt index ada377f31c..6a108df146 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt @@ -87,8 +87,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, setExtraGPSData(gnssInfo) } - @Volatile - private var isVisualAngleChanged = false + private var currentLevel:Int = 0 override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) { super.onAutopilotLightSwitchData(lightSwitch) @@ -96,35 +95,28 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, when (it.number) { Chassis.LightSwitch.LIGHT_LEFT_VALUE -> { //左转灯 CallerVisualAngleManager.showTurning(true) - showTurn(1) + turn(1) } Chassis.LightSwitch.LIGHT_RIGHT_VALUE -> { //右转灯 CallerVisualAngleManager.showTurning(true) - showTurn(2) - + turn(2) } Chassis.LightSwitch.LIGHT_NONE_VALUE -> { CallerVisualAngleManager.showTurning(false) - hideTurn() + turn(0) } } } } - private fun showTurn(lightNum: Int) { - if (!isVisualAngleChanged) { - isVisualAngleChanged = true + private fun turn(lightNum: Int) { + if (currentLevel != lightNum) { when (lightNum) { + 0 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500) 1 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500) 2 -> CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500) } - } - } - - private fun hideTurn() { - if (isVisualAngleChanged) { - isVisualAngleChanged = false - CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500) + currentLevel = lightNum } }