[2.15.0][V2N] V2N上车新老链路兼容处理

This commit is contained in:
renwj
2023-04-13 14:45:36 +08:00
parent c92233455e
commit b28e8b213b
2 changed files with 19 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ import android.util.Log
import androidx.annotation.RequiresApi
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.config.*
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CLOUD_V2N
@@ -51,6 +52,7 @@ import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
import com.mogo.eagle.core.utilcode.mogo.*
import com.mogo.eagle.function.biz.v2x.v2n.V2XPoiLoader.Companion.v2xPoiLoader
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
@@ -178,7 +180,9 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
handleRoadMarkerEvent(event.data.toRoadMarker())
}
is V2XEvent.RoadEventX -> {
handleRoadMarkerEvent(event.data.toRoadMarker())
if (!AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !FunctionBuildConfig.isNewV2NData) {
handleRoadMarkerEvent(event.data.toRoadMarker())
}
}
else -> {
Logger.e(TAG, "onAck other event: $event")

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.function.biz.v2x.v2n.pnc
import android.os.*
import androidx.core.util.*
import com.mogo.eagle.core.data.config.*
import com.mogo.eagle.core.data.enums.*
import com.mogo.eagle.core.data.enums.WarningDirectionEnum.ALERT_WARNING_TOP
import com.mogo.eagle.core.data.map.entity.*
@@ -14,6 +15,7 @@ import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.hmi.*
import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
import com.mogo.eagle.core.utilcode.mogo.*
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.*
@@ -221,18 +223,24 @@ internal object V2NIdentifyDrawer {
}
private fun drawShiGong(events: List<TrackedObject>) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGONE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events))
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGONE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events))
}
}
private fun drawShiGu(events: List<TrackedObject>) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGU, events))
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGU, events))
}
}
private fun drawYongDu(events: List<MogoV2X.RTEData_PB>) {
handler.removeMessages(MSG_WHAT_DRAW_YONGDU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_YONGDU, events))
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) {
handler.removeMessages(MSG_WHAT_DRAW_YONGDU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_YONGDU, events))
}
}
fun init() {