From 883af483e982a06088110a59389a0bf3637927e2 Mon Sep 17 00:00:00 2001 From: renwj Date: Mon, 11 Mar 2024 18:58:51 +0800 Subject: [PATCH] =?UTF-8?q?[6.3.0][V2N=E6=96=B0=E9=93=BE=E8=B7=AF]=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 9cce260402..c6adbd00bf 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.v2x.v2n.pnc import android.os.Handler import android.os.HandlerThread import android.os.Message +import android.util.Log import androidx.core.util.Pair import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.enums.CommunicationType @@ -30,6 +31,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox import com.mogo.eagle.core.utilcode.util.CoordinateTransform import com.mogo.eagle.core.utilcode.util.CoordinateUtils import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils +import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.function.biz.v2x.V2XBizTrace import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker.Marker @@ -57,6 +59,11 @@ internal object V2NIdentifyDrawer { V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu" to ""), true) return@Callback true } + if (msg.what == MSG_WHAT_DRAW_SHIGONE) { + Log.d("V2NIdentifyDrawer", "---callback -- drawShiGong --- 1 ---") + } else { + Log.d("V2NIdentifyDrawer", "---callback -- drawShiGu --- 1 ---") + } val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() val filtered = events.filterIsInstance(TrackedObject::class.java).filter { itx -> DrivingDirectionUtils.getDegreeOfCar2Poi( @@ -68,9 +75,19 @@ internal object V2NIdentifyDrawer { ) < 90 } if (filtered.isEmpty()) { + if (msg.what == MSG_WHAT_DRAW_SHIGONE) { + Log.d("V2NIdentifyDrawer", "---callback -- drawShiGong --- filter is empty return ---") + } else { + Log.d("V2NIdentifyDrawer", "---callback -- drawShiGu --- filter is empty return---") + } V2XBizTrace.onAck(TAG, mapOf("shiGong-shiGu-filter" to ""), true) return@Callback true } + if (msg.what == MSG_WHAT_DRAW_SHIGONE) { + Log.d("V2NIdentifyDrawer", "---callback -- drawShiGong --- 2 ---:data: ${ filtered.joinToString(",") { GsonUtils.toJson(it) } }") + } else { + Log.d("V2NIdentifyDrawer", "---callback -- drawShiGu --- 2 ---data: ${ filtered.joinToString(",") { GsonUtils.toJson(it) } }") + } filtered.forEach { itx -> val id = itx.uuid.toString() AiRoadMarker.aiMakers.getOrPut(id) { @@ -157,8 +174,10 @@ internal object V2NIdentifyDrawer { }.receive() } } else if (msg.what == MSG_WHAT_DRAW_YONGDU) { + Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 1 ---") val events = msg.obj as? List<*> if (events == null || events.isEmpty()) { + Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 1 filter is empty ---") V2XBizTrace.onAck(TAG, mapOf("yongDu" to ""), true) return@Callback true } @@ -179,9 +198,11 @@ internal object V2NIdentifyDrawer { ) < 90 } if (filtered.isEmpty()) { + Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 2 filter is empty ---") V2XBizTrace.onAck(TAG, mapOf("yongDu-filter" to ""), true) return@Callback true } + Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 2 ---data: ${ filtered.joinToString(",") }") filtered.forEach { itx -> val id = itx.rteId.toString() val lon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } @@ -344,13 +365,16 @@ internal object V2NIdentifyDrawer { } private fun drawShiGong(events: List) { + Log.d("V2NIdentifyDrawer", "---drawShiGong --- 1 ---:${events.size}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { + Log.d("V2NIdentifyDrawer", "---drawShiGong --- 2 ---") handler.removeMessages(MSG_WHAT_DRAW_SHIGONE) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events)) } } private fun drawShiGu(events: List) { + Log.d("V2NIdentifyDrawer", "---drawShiGu --- 1 ---:${events.size}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_SHIGU) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGU, events)) @@ -358,6 +382,7 @@ internal object V2NIdentifyDrawer { } private fun drawYongDu(events: List) { + Log.d("V2NIdentifyDrawer", "---drawYongDu --- 1 ---:${events.size}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_YONGDU) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_YONGDU, events))