From e5563ed3cdea683cde2422eb460135afa5fb2662 Mon Sep 17 00:00:00 2001 From: EmArrow Date: Sat, 12 Oct 2024 10:56:32 +0800 Subject: [PATCH] [6.6.2] fixbug of count --- .../eagle/core/function/DataCenterProvider.kt | 2 - .../datacenter/v2x/RoadLineEventManager.kt | 48 ------------------- .../core/function/view/RoadCrossRoamView.kt | 2 + 3 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/RoadLineEventManager.kt diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/DataCenterProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/DataCenterProvider.kt index 43ec9965e1..97f447c434 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/DataCenterProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/DataCenterProvider.kt @@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.datacenter.location.MoGoLocationDispatcher -import com.mogo.eagle.core.function.datacenter.v2x.RoadLineEventManager import com.mogo.eagle.core.function.datacenter.v2x.SpeedLimitDispatcher import com.mogo.eagle.core.function.datacenter.v2x.TrafficLightDispatcher @@ -28,7 +27,6 @@ class DataCenterProvider: IDataCenterProvider { CallerMsgBoxManager.queryAllMessages(it) TrafficLightDispatcher.INSTANCE.initServer(it) SpeedLimitDispatcher.INSTANCE.initLimit(it) - RoadLineEventManager.INSTANCE.init() } } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/RoadLineEventManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/RoadLineEventManager.kt deleted file mode 100644 index 2d2689a594..0000000000 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/RoadLineEventManager.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.mogo.eagle.core.function.datacenter.v2x - -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener -import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager -import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager -import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager -import com.zhidaoauto.map.data.road.RoadCross - - -/** - * 路线功能相关,绑定路线id后,业务控制,数据变化均可以封装在这里实现 - */ -class RoadLineEventManager : IMoGoMapRoadListener, IMoGoAutopilotStatusListener { - - companion object{ - - private const val TAG = "RoadLineEventManager" - - val INSTANCE by lazy(LazyThreadSafetyMode.SYNCHRONIZED){ - RoadLineEventManager() - } - } - - @Volatile - private var record = false - - fun init() { - CallerMapRoadListenerManager.addListener(TAG, this) - CallerAutoPilotStatusListenerManager.addListener(TAG, this) - } - - override fun onAutopilotRouteLineId(lineId: Long) { - super.onAutopilotRouteLineId(lineId) - record = lineId != 0L - } - - override fun onRoadChange(cross: Boolean, roadCross: RoadCross?) { - super.onRoadChange(cross, roadCross) - if(!record){ - return - } - if(cross){ - CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.ROAD) - } - } - -} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt index 6196d3578d..1f00954c8c 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt @@ -21,6 +21,7 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion. import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener import com.mogo.eagle.core.function.business.roadcross.RoadCrossCameraManager.Companion.instance import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerServicesEventManager import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager @@ -247,6 +248,7 @@ class RoadCrossRoamView @JvmOverloads constructor( AIAssist.getInstance(context).speakTTSVoice(disStr) } CallerHmiViewControlListenerManager.invokeV2XEvent(View.VISIBLE, TAG) + CallerServicesEventManager.updateServicesNum(CallerServicesEventManager.ServiceType.ROAD) bringToFront() this.visibility = View.VISIBLE ivZhiRoadRoamView.visibility = View.VISIBLE