diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/PncActionsView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/PncActionsView.kt index 0615fac9b9..7c7e6da225 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/PncActionsView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/PncActionsView.kt @@ -90,27 +90,28 @@ class PncActionsView @JvmOverloads constructor( UiThreadHandler.post { if (CallerAutoPilotStatusListenerManager.getState() == STATUS_AUTOPILOT_RUNNING) { var actions: String? = null - planningActionMsg.actionMsg?.let { it -> + planningActionMsg.actionMsg?.let { try { actions = PncActionsHelper.getAction( it.drivingState.number, it.drivingAction.number ) + + //如果是存在云端红绿灯数据条件下,设置云端数据 + if (PncActionsHelper.isWaitingTrafficlight( + it.drivingState.number, + it.drivingAction.number + ) + && mTrafficLightResult != null + && hasRedLight() + ) { + actions += ",预计${getWaitTrafficLightTime()}秒后通过" + } else { + mTrafficLightResult = null + } } catch (e: Exception) { e.printStackTrace() } - //如果是存在云端红绿灯数据条件下,设置云端数据 - if (PncActionsHelper.isWaitingTrafficlight( - it.drivingState.number, - it.drivingAction.number - ) - && mTrafficLightResult != null - && hasRedLight() - ) { - actions += ",预计${getWaitTrafficLightTime()}秒后通过" - } else { - mTrafficLightResult = null - } } // update view if (actions.isNullOrEmpty()) { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/pnc/PncActionsHelper.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/pnc/PncActionsHelper.kt index 8b9b5e37ae..a7cfb88451 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/pnc/PncActionsHelper.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/pnc/PncActionsHelper.kt @@ -91,6 +91,9 @@ class PncActionsHelper { WAITING_V2N_VALUE -> { if (driveAction == 1) "正在尝试绕过前方道路事件" else if (driveAction == 2) "正在请求远程协助" else "" } + YIELD_TO_VEHICLE_COMING_FROM_BEHIND_VALUE -> { + if (driveAction == 1) "正在给后方驶来的机动车让行" else "" + } else -> "" } }