From b209e214d1a27af5936174dee324a112c21aba70 Mon Sep 17 00:00:00 2001 From: renwj Date: Wed, 24 Jul 2024 11:04:33 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0][=E9=81=93=E8=B7=AF=E4=BA=8B=E4=BB=B6]?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E5=B0=8F=E6=99=BA=E5=BD=A2=E8=B1=A1?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=8F=98=E5=8C=96=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busstation/PassBusStationEventManager.kt | 14 ++++++++++++++ .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 17 +++++++++++++++++ .../v2n/scenario/scene/airoad/AiRoadMarker.kt | 19 +++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/busstation/PassBusStationEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/busstation/PassBusStationEventManager.kt index d2e15046d8..17b7684610 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/busstation/PassBusStationEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/busstation/PassBusStationEventManager.kt @@ -11,8 +11,12 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.map.MogoLocation import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener +import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.V2N +import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.START +import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.STOP import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager +import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils @@ -116,6 +120,11 @@ object PassBusStationEventManager : IMoGoChassisLocationWGS84Listener { ) if (angle >= 90 || distance >= 150) { CallerRoadV2NEventWindowListenerManager.dismiss(it.getBusStationId()) + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION), STOP) + } + } busStationListNeedNotified.remove(it.getBusStationId()) trackEvent("dismiss --> busStationId=${it.getBusStationId()}") Logger.d( @@ -156,6 +165,11 @@ object PassBusStationEventManager : IMoGoChassisLocationWGS84Listener { if (list.isNotEmpty()) { list.first().also { it.notifyTime = System.currentTimeMillis() + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION), START) + } + } CallerRoadV2NEventWindowListenerManager.showImage( it.getBusStationId(), it.notifyTime, 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 bb428f2458..a48ab3dd3c 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 @@ -18,6 +18,8 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType.V2X import com.mogo.eagle.core.data.msgbox.V2XMsg import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener import com.mogo.eagle.core.function.api.autopilot.IMoGoV2nNioEventListener +import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.V2N +import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.START import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager @@ -183,6 +185,11 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } else { sb.append("发现前方${distance.toInt()}米${ if (poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGONG.poiType) "车道施工" else "车道事故" }@@, 蘑菇时刻为您守护") } + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), START) + } + } val ss = sb.toString() val content = ss.substring(0, ss.indexOf("@@")) val tts = ss.replace("@@", "") @@ -239,6 +246,11 @@ internal object V2NIdentifyDrawer: IEventDismissListener { return@Callback true } val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE), START) + } + } // 弹事件框 val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()) val alertTts = String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()) @@ -353,6 +365,11 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } Logger.i(TAG, "people cross -- 3 --") val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS), START) + } + } // 弹事件框 val alertContent = String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()) val alertTts = String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt index 62c63a4a7c..202c88d387 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt @@ -7,13 +7,17 @@ import android.os.HandlerThread import android.os.Looper import android.view.animation.DecelerateInterpolator import androidx.core.util.Pair +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.map.MogoLatLng import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity +import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.V2N +import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State.STOP import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.util.CoordinateUtils import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils @@ -128,6 +132,11 @@ class AiRoadMarker { CallerHmiManager.dismissGreenWave() } else { CallerRoadV2NEventWindowListenerManager.dismiss(marker.id) + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(marker.poiType)), STOP) + } + } } } wrapper.addPoint(p) @@ -296,6 +305,11 @@ class AiRoadMarker { aiMakers.remove(id)?.also { val m = it.marker.get() CallerRoadV2NEventWindowListenerManager.dismiss(m.id) + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(marker.poiType)), STOP) + } + } } } MarkerRemoveManager.addMarker(wrapper) @@ -325,6 +339,11 @@ class AiRoadMarker { CallerHmiManager.dismissGreenWave() } else { MarkerRemoveManager.removeMarker(marker.id) + if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { + runCatching { + CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(marker.poiType)), STOP) + } + } CallerRoadV2NEventWindowListenerManager.dismiss(marker.id) } }