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 c6d9ffe435..ad29d5664c 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 @@ -6,6 +6,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths import com.mogo.eagle.core.function.api.datacenter.IDataCenterProvider 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 @@ -24,6 +25,7 @@ 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 new file mode 100644 index 0000000000..f17e7af4dd --- /dev/null +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/v2x/RoadLineEventManager.kt @@ -0,0 +1,47 @@ +package com.mogo.eagle.core.function.datacenter.v2x + +import android.util.Log +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.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() + } + } + + 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) + Log.e(TAG, "onRoadChange: $cross, $roadCross") + if(!record){ + return + } + if(!cross){ + CallerAutoPilotStatusListenerManager.updateRoadCount() + } + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt index 1b4b1a1f43..1e13483d46 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt @@ -146,7 +146,7 @@ object TrackerSourceFilterHelper { .longitude(data.longitude) .isUseGps(true) .rotate(data.heading.toFloat()) - .icon3DRes(R.raw.yujingguangquan) + .icon3DRes(R.raw.testguangquan) .scale(scale) .set3DMode(true) .build() diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt index 066ab1357c..be19cc0c29 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/roadcross/RoadCrossCameraManager.kt @@ -33,7 +33,7 @@ class RoadCrossCameraManager : IMoGoMapRoadListener { private const val TAG = "RoadCrossCameraManager" private const val REQUEST_CAMERA_MSG = 0 - private const val REMOVE_MARKER_DELAY_TIME = 10_000L + private const val REMOVE_MARKER_DELAY_TIME = 10000L val instance: RoadCrossCameraManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { RoadCrossCameraManager() @@ -53,6 +53,7 @@ class RoadCrossCameraManager : IMoGoMapRoadListener { private val handler = object :Handler(Looper.getMainLooper()){ override fun handleMessage(msg: Message) { super.handleMessage(msg) + CallerLogger.d("$M_MAP$TAG", "remove marker") overlayManager?.removeAllPointsInOwner(TAG) } } @@ -169,7 +170,7 @@ class RoadCrossCameraManager : IMoGoMapRoadListener { // 停止请求摄像头数据 ndeRoadCameraNetWorkModel.cancelRequest("roadCross") // 清除marker - CallerLogger.d("$M_MAP$TAG", "remove marker") + CallerLogger.d("$M_MAP$TAG", "remove marker handler") handler.sendEmptyMessageDelayed(REQUEST_CAMERA_MSG, REMOVE_MARKER_DELAY_TIME) // 释放控制 isCameraRequest = false diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt index 3245e3375e..d78b80c3b8 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapRoamView.kt @@ -77,6 +77,7 @@ class MapRoamView(context: Context?, attrs: AttributeSet?) : MogoMapView(context fun openRoam() { this.onResume() getUI()?.setVisible(true) + getUI()?.showMyLocation(false) CallerMapAiCloudDataManager.addListener(RoadCrossRoamView.TAG, this) // 更新地图视角 - 高视角 getUI()?.changeMapVisualAngle(VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP, null) diff --git a/core/function-impl/mogo-core-function-map/src/main/res/raw/testguangquan.nt3d b/core/function-impl/mogo-core-function-map/src/main/res/raw/testguangquan.nt3d new file mode 100644 index 0000000000..59263ba5ce Binary files /dev/null and b/core/function-impl/mogo-core-function-map/src/main/res/raw/testguangquan.nt3d differ diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index d9d31a0c1c..91a1929e7a 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -16,6 +16,7 @@ import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg import system_master.SsmInfo import system_master.SystemStatusInfo +import java.util.concurrent.atomic.AtomicInteger import kotlin.properties.Delegates /** @@ -69,6 +70,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase