[6.5.0][道路事件] 优化测试用例
This commit is contained in:
@@ -6,6 +6,8 @@ import androidx.lifecycle.lifecycleScope
|
||||
import com.google.protobuf.TextFormat
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLine
|
||||
import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
@@ -16,6 +18,7 @@ import com.mogo.eagle.core.data.v2x.V2XEvent.RoadEventX
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setDemoMode
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setIgnoreConditionDraw
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
@@ -66,7 +69,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
private var listener: EventListener? = null
|
||||
|
||||
override fun handleMsgFromServer(msg: MogoProtocolMsg?, channel: Channel?) {
|
||||
msg?.let {
|
||||
msg?.let { it ->
|
||||
if (it.protocolType == TelematicConstant.V2N_AI_ROAD_DATA_TO_PASSENGER) {
|
||||
try {
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的V2N事件 --- 1 ---")
|
||||
@@ -84,6 +87,9 @@ class TeleMsgHandler : IMsgHandler {
|
||||
|
||||
if (it.protocolType == TelematicConstant.V2N_AI_ROAD_PEOPLE_CROSS) {
|
||||
runCatching {
|
||||
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(AutopilotControlParameters().also { itx ->
|
||||
itx.autoPilotLine = AutoPilotLine(10L, "", "","", "", System.currentTimeMillis(), "")
|
||||
})
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的行人/非机动车横穿事件 --- 1 ---")
|
||||
CallerV2nNioEventListenerManager.invokeV2nNioCrossoverEvent(MessagePad.Event.parseFrom(msg.body))
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的行人/非机动车横穿事件 --- 2 ---")
|
||||
@@ -93,6 +99,9 @@ class TeleMsgHandler : IMsgHandler {
|
||||
if (it.protocolType == TelematicConstant.V2N_AI_ROAD_GREEN_WAVE) {
|
||||
runCatching {
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的绿波通行 --- 1 ---")
|
||||
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(AutopilotControlParameters().also { itx ->
|
||||
itx.autoPilotLine = AutoPilotLine(10L, "", "","", "", System.currentTimeMillis(), "")
|
||||
})
|
||||
CallerV2nNioEventListenerManager.invokeV2nNioGreenWavePassageEvent(MessagePad.V2nCrossSpeed.parseFrom(msg.body))
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的绿波通行 --- 2 ---")
|
||||
}
|
||||
@@ -101,6 +110,9 @@ class TeleMsgHandler : IMsgHandler {
|
||||
if (it.protocolType == TelematicConstant.V2N_AI_ROAD_OTHER_RETROGRADE_VEHICLE) {
|
||||
runCatching {
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的他车逆行 --- 1 ---")
|
||||
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(AutopilotControlParameters().also { itx ->
|
||||
itx.autoPilotLine = AutoPilotLine(10L, "", "","", "", System.currentTimeMillis(), "")
|
||||
})
|
||||
CallerV2nNioEventListenerManager.invokeV2nNioOtherRetrogradeEvent(MessagePad.Event.parseFrom(msg.body))
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的他车逆行 --- 2 ---")
|
||||
}
|
||||
@@ -108,6 +120,9 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
if (it.protocolType == TelematicConstant.V2N_AI_ROAD_SHI_GONG) {
|
||||
runCatching {
|
||||
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(AutopilotControlParameters().also { itx ->
|
||||
itx.autoPilotLine = AutoPilotLine(10L, "", "","", "", System.currentTimeMillis(), "")
|
||||
})
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的道路施工 --- 1 ---")
|
||||
CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate(Collections.singletonList(TrackedObject.parseFrom(msg.body)))
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的道路施工 --- 2 ---")
|
||||
@@ -116,6 +131,9 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
if (it.protocolType == TelematicConstant.V2N_AI_ROAD_SHI_GU) {
|
||||
runCatching {
|
||||
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(AutopilotControlParameters().also { itx ->
|
||||
itx.autoPilotLine = AutoPilotLine(10L, "", "","", "", System.currentTimeMillis(), "")
|
||||
})
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的道路事故 --- 1 ---")
|
||||
CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate(Collections.singletonList(TrackedObject.parseFrom(msg.body)))
|
||||
Log.d(TAG, "乘客屏收到司机屏转发云端下发的道路事故 --- 2 ---")
|
||||
|
||||
Reference in New Issue
Block a user