[2.15.0]fix bug of roma which click has no react and multi obj problem
This commit is contained in:
@@ -5,6 +5,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMogoRoma
|
||||
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
|
||||
import com.mogo.eagle.core.function.business.SpeedLimitDataManager
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.aiCloudIdentifyDataManager
|
||||
@@ -12,7 +13,7 @@ import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_MAP_BIZ)
|
||||
class MapBizProvider :IMoGoFunctionServerProvider{
|
||||
class MapBizProvider :IMoGoFunctionServerProvider, IMogoRoma {
|
||||
|
||||
override val functionName: String
|
||||
get() = "MapBizProvider"
|
||||
@@ -25,6 +26,10 @@ class MapBizProvider :IMoGoFunctionServerProvider{
|
||||
aiCloudIdentifyDataManager.initServer(AbsMogoApplication.getApp())
|
||||
}
|
||||
|
||||
override fun trigger(romaStatus: Boolean) {
|
||||
aiCloudIdentifyDataManager.trigger(romaStatus)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import android.util.Log
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMogoRoma
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel.Companion.aiCloudIdentifyNetWorkModel
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLongSightLevel
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
|
||||
@@ -31,9 +30,9 @@ import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.yycp.api.proto.SocketDownData
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_ROMA)
|
||||
class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogoRoma,
|
||||
class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
IMoGoPlanningRottingListener, IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
@@ -48,13 +47,9 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo
|
||||
}
|
||||
}
|
||||
|
||||
private var showAiCloud = false
|
||||
private var showAiCloud = AtomicBoolean(false)
|
||||
private var serverSn = ""
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
}
|
||||
|
||||
fun initServer(mContext: Context) {
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG, this)
|
||||
@@ -79,7 +74,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo
|
||||
override fun onMsgReceived(obj: SocketDownData.SocketDownDataProto?) {
|
||||
obj?.let {
|
||||
obj.data?.let {
|
||||
if (showAiCloud) {
|
||||
if (showAiCloud.get()) {
|
||||
if (it.allListList == null || it.allListList.size == 0) {
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
return
|
||||
@@ -93,7 +88,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo
|
||||
}
|
||||
}
|
||||
|
||||
override fun trigger(romaStatus: Boolean) {
|
||||
fun trigger(romaStatus: Boolean) {
|
||||
MapBizTrace.log(TAG, "trigger")
|
||||
// 乘客屏单独控制漫游
|
||||
if (romaStatus) {
|
||||
@@ -143,6 +138,10 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo
|
||||
return
|
||||
}
|
||||
}
|
||||
if (!showAiCloud.get()) {
|
||||
Log.d("emArrow", "closeRoma,showAiCloud is false, return ")
|
||||
return
|
||||
}
|
||||
requestRangeOfIdentify(false)
|
||||
updateLongSightLevel(false)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
@@ -154,6 +153,15 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo
|
||||
}
|
||||
|
||||
fun requestRangeOfIdentify(dataReceive: Boolean) {
|
||||
// if (dataReceive) { //todo test
|
||||
// // 请求地图开始漫游
|
||||
// MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
// CallerMapRomaListener.invokeMapRoma(true)
|
||||
// sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "3".toByteArray())
|
||||
// } else {
|
||||
// CallerMapRomaListener.invokeMapRoma(false)
|
||||
// sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "4".toByteArray())
|
||||
// }
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, serverSn, {
|
||||
MapBizTrace.log(
|
||||
TAG,
|
||||
@@ -171,23 +179,25 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener, IMogo
|
||||
TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE, dataReceive:$dataReceive"
|
||||
)
|
||||
updateLongSightLevel(false)
|
||||
})
|
||||
}
|
||||
|
||||
override fun onMapVisualAngleChanged(visualAngleMode: VisualAngleMode) {
|
||||
super.onMapVisualAngleChanged(visualAngleMode)
|
||||
Log.d("emArrow", "onMapVisualAngleChanged , thread : ${Thread.currentThread().name}")
|
||||
when {
|
||||
// 解除漫游限制
|
||||
visualAngleMode.isRoma -> {
|
||||
showAiCloud = true
|
||||
showAiCloud.set(true)
|
||||
Log.d("emArrow", "map call back roma , showAiCloud : ${showAiCloud.get()}")
|
||||
FunctionBuildConfig.isDrawIdentifyData = false
|
||||
}
|
||||
else -> {
|
||||
if (showAiCloud) {
|
||||
showAiCloud = false
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
if (showAiCloud.get()) {
|
||||
closeRoma(false)
|
||||
Log.d("emArrow", "解除漫游限制")
|
||||
showAiCloud.set(false)
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user