[6.2.6][V2N] V2N新需求代码提交
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoV2XListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager.V2NCarTypeCheck.Companion.verifyCarType
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import mogo.v2x.MogoV2X
|
||||
@@ -18,9 +19,23 @@ object CallerV2XListenerManager : CallerBase<IMoGoV2XListener>() {
|
||||
private var congestionTmp: MogoV2X.RSI_PB? = null
|
||||
private var parkingViolationTmp: MogoV2X.RSM_PB? = null
|
||||
|
||||
class V2NCarTypeCheck {
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun verifyCarType(): Boolean {
|
||||
val appIdentityMode = FunctionBuildConfig.appIdentityMode
|
||||
return AppIdentityModeUtils.isTaxi(appIdentityMode) || //Taxi司乘屏
|
||||
AppIdentityModeUtils.isBus(appIdentityMode) || //公交司乘屏
|
||||
AppIdentityModeUtils.isM2(appIdentityMode) || //B2接驳司乘屏
|
||||
AppIdentityModeUtils.isJL(appIdentityMode) //B1接驳司乘屏
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoV2XListener) {
|
||||
if (eventCountTmp >= 0) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
if (verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
listener.onV2nGlobalPathEvents(eventCountTmp, constructTmp, triangleTmp, congestionTmp, parkingViolationTmp)
|
||||
}
|
||||
}
|
||||
@@ -37,7 +52,7 @@ object CallerV2XListenerManager : CallerBase<IMoGoV2XListener>() {
|
||||
parkingViolationTmp = parkingViolation
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
if (verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
listener.onV2nGlobalPathEvents(eventCount, construct, triangle, congestion, parkingViolation)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user