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 cb0d5b044c..bb428f2458 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 @@ -240,16 +240,23 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) // 弹事件框 + 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()) CallerRoadV2NEventWindowListenerManager.showLiveVideo( newEventId, event.timestamp, EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), - String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()), + alertContent, isDriver, - String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()), + alertTts, cameraIp.toString(), eventLocation[0], eventLocation[1]) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent( + EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType, alertContent, alertTts, + DataSourceType.AICLOUD, CommunicationType.V2N + ) AiRoadMarker() }.also { it.marker(Marker(newEventId, EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType, eventLocation[0], eventLocation[1], heading, isUseGps = isUseGps), drawMarker = true, false, isHighFrequency = true) @@ -277,6 +284,8 @@ internal object V2NIdentifyDrawer: IEventDismissListener { val min = abs(data.speedStraightMin * 3.6f).toInt() val max = abs(data.speedStraightMax * 3.6f).toInt() marker(Marker(id, EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, destX, destY, 0.0, null, null, null), drawMarker = false, false) + var alertTts = "" + var alertContent = "" if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { AppStateManager.currentActivity()?.let { val speakText = StringBuilder("保持当前车速即可通过路口,好丝滑!") @@ -288,9 +297,17 @@ internal object V2NIdentifyDrawer: IEventDismissListener { speakText.setLength(0) speakText.append("蘑菇推荐您降低车速至${max}千米每小时, 当前车速${current}千米每小时") } - AIAssist.getInstance(it).speakTTSVoice(speakText.toString()) + val tts = speakText.toString() + alertTts = tts + alertContent = tts + AIAssist.getInstance(it).speakTTSVoice(tts) } } + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent( + EventTypeEnumNew.TYPE_SOCKET_ROAD_GREE_WAVE.poiType, alertContent, alertTts, + DataSourceType.AICLOUD, CommunicationType.V2N + ) CallerHmiManager.showGreenWave(min, max, computeCrossCountBetween(Triple(location.longitude, location.latitude, location.heading), kotlin.Pair(destX, destY))) } finally { receive() @@ -337,16 +354,23 @@ internal object V2NIdentifyDrawer: IEventDismissListener { Logger.i(TAG, "people cross -- 3 --") val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) // 弹事件框 + 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()) CallerRoadV2NEventWindowListenerManager.showLiveVideo( data.eventId, data.timestamp, EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), - String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()), + alertContent, isDriver, - String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()), + alertTts, cameraIp.toString(), eventLocation[0], eventLocation[1]) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent( + EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType, alertContent, alertTts, + DataSourceType.AICLOUD, CommunicationType.V2N + ) AiRoadMarker() }.also { Logger.i(TAG, "people cross -- 4 --")