From a896e6ff5fcad7e8be29abc51202e80a47dd1a38 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Wed, 17 May 2023 12:14:20 +0800 Subject: [PATCH] [3.2.0]fix bug of roma has no lat and lon, and add trace log start request ,plus open the adas data track for default --- .../autopilot/adapter/MoGoAdasListenerImpl.kt | 18 +++++++++--------- .../trace/TraceManager.kt | 4 ++-- .../business/ai/AiCloudIdentifyDataManager.kt | 10 +++++++--- .../ai/net/AiCloudIdentifyNetWorkModel.kt | 12 ++++++++---- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt index 2bf5aa76aa..ea44139ef5 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -108,15 +108,15 @@ class MoGoAdasListenerImpl : OnAdasListener { } } - //感知物体 - @ChainLog( - linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED, - linkCode = CHAIN_LINK_ADAS, - endpoint = PAD, - nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA, - paramIndexes = [0, 1], - clientPkFileName = "sn" - ) + //感知物体 注解暂时关闭,通过调试面板查看数量,此注解暂时用于aiCloud显示感知物 +// @ChainLog( +// linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED, +// linkCode = CHAIN_LINK_ADAS, +// endpoint = PAD, +// nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA, +// paramIndexes = [0, 1], +// clientPkFileName = "sn" +// ) override fun onTrackedObjects( header: MessagePad.Header, trackedObjects: MessagePad.TrackedObjects diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt index 330c6ccc73..28e0080ac0 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt @@ -54,7 +54,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT] = FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_AUTO) fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED] = - FwBuild(false, 30, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_DATA_TRACK) + FwBuild(false, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_DATA_TRACK) fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY] = FwBuild(false, 30, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_TRAJECTORY) fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE] = @@ -82,7 +82,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener { traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT] = ChainLogParam(true, "ADAS自动驾驶链路(包含: 自动驾驶状态交互,全局路径,到站提醒,节点状态,异常上报)") traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED] = - ChainLogParam(false, "ADAS感知物体") + ChainLogParam(true, "ADAS感知物体") traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY] = ChainLogParam(false, "ADAS车前引导线") traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE] = diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt index 4c9d09af54..f994b2e2c6 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt @@ -4,6 +4,7 @@ import android.content.Context import com.mogo.aicloud.services.socket.IMogoOnMessageListener import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager import com.mogo.commons.debug.DebugConfig +import com.mogo.commons.module.status.MogoStatusManager import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.multidisplay.TelematicConstant @@ -13,6 +14,7 @@ import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel. import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager import com.mogo.eagle.core.function.call.map.CallerMapRomaListener import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager @@ -125,8 +127,10 @@ class AiCloudIdentifyDataManager : IMogoMapListener, // CallerMapRomaListener.invokeMapRoma(false) // sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "4".toByteArray()) // } - MapBizTrace.log(TAG,"开启请求,data:$dataReceive") - aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, serverSn, { + val status = MogoStatusManager.getInstance().isSocketOnLine + val gnss = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo + MapBizTrace.log(TAG,"开启请求,data:$dataReceive , socketStatus:$status , lon:${gnss.longitude} , lat:${gnss.latitude}") + aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, gnss.longitude,gnss.latitude,{ MapBizTrace.log( TAG, "requestIdentifyRange ok startRange:$START_METRE, endRange:$END_METRE , dataReceive:$dataReceive" @@ -156,7 +160,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener, when { // 解除漫游限制 visualAngleMode.isRoma -> { - MapBizTrace.log(TAG, "onMapVisualAngleChanged, invoke roma") + MapBizTrace.log(TAG, "onMapVisualAngleChanged, invoke roma , socketStatus: ${ MogoStatusManager.getInstance().isSocketOnLine}") showAiCloud.set(true) FunctionBuildConfig.isDrawIdentifyData = false } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt index 57f6e064f3..61a48f2c0b 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt @@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.ai.net import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.commons.constants.HostConst.getEagleHost -import com.mogo.commons.debug.DebugConfig import com.mogo.eagle.core.data.BaseResponse import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.START_METRE @@ -10,7 +9,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.network.apiCall import com.mogo.eagle.core.network.request -class AiCloudIdentifyNetWorkModel private constructor(){ +class AiCloudIdentifyNetWorkModel private constructor() { companion object { val aiCloudIdentifyNetWorkModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) { @@ -25,7 +24,7 @@ class AiCloudIdentifyNetWorkModel private constructor(){ fun requestIdentifyRange( dataReceive: Boolean, - serverSn:String, + lon: Double, lat: Double, onSuccess: (() -> Unit), onError: ((String) -> Unit) ) { @@ -37,7 +36,12 @@ class AiCloudIdentifyNetWorkModel private constructor(){ map["startMetre"] = START_METRE map["endMetre"] = END_METRE map["type"] = 1 - map["relationSn"] = serverSn + if (lon != 0.0) { + map["lon"] = lon + } + if (lat != 0.0) { + map["lat"] = lat + } } loader { apiCall {