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 1b033096b0..31d352aaee 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 @@ -170,6 +170,10 @@ object PassBusStationEventManager : IMoGoChassisLocationWGS84Listener { it.notifyDistance ), isDriverScreen, + String.format( + EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType), + it.notifyDistance + ), UriUtils.res2Uri( EventTypeEnumNew.getPoiTypeBg( EventTypeEnumNew.TYPE_USECASE_ROAD_BUS_STATION.poiType, 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 8e0b3d1082..e276d94b4d 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 @@ -203,7 +203,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } } val alert = sb.toString() - CallerRoadV2NEventWindowListenerManager.showLiveVideo("${itx.longitude}-${itx.latitude}", itx.systemTime.toLong(), EventTypeEnumNew.getUpdateIconRes(poiType), alert, isDriver, itx.cameraIp, itx.longitude, itx.latitude) + CallerRoadV2NEventWindowListenerManager.showLiveVideo("${itx.longitude}-${itx.latitude}", itx.systemTime.toLong(), EventTypeEnumNew.getUpdateIconRes(poiType), alert, isDriver, alert, itx.cameraIp, itx.longitude, itx.latitude) } } //消息埋点 @@ -350,6 +350,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()), isDriver, + String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_OTHER_RETROGRADE_VEHICLE.poiType), distance.toInt()), cameraIp.toString(), event.longitude, event.latitude) @@ -410,6 +411,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { EventTypeEnumNew.getUpdateIconRes(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), String.format(EventTypeEnumNew.getAlarmContent(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()), isDriver, + String.format(EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType), distance.toInt()), cameraIp.toString(), data.longitude, data.latitude) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt index aa58c81c53..5c87856b10 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt @@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.v2n import android.content.Context import android.graphics.Color +import android.text.TextUtils import android.util.AttributeSet import android.util.TypedValue import android.view.LayoutInflater @@ -283,7 +284,7 @@ class RoadV2NEventWindowView @JvmOverloads constructor( tvV2XHintContent.text = dataBean.hintStr tvV2XTimeStr.text = "更新时间:${DateTimeUtils.getTimeText(dataBean.timestamp, DateTimeUtils.HH_mm_ss)}" - if (dataBean.isNeedTTS) { + if (dataBean.isNeedTTS && !TextUtils.isEmpty(dataBean.ttsStr)) { AIAssist.getInstance(context) .speakTTSVoiceWithLevel(dataBean.hintStr, AIAssist.LEVEL0) } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/v2x/RoadV2NEventWindowBean.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/v2x/RoadV2NEventWindowBean.kt index dd65605242..9d30761f1e 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/v2x/RoadV2NEventWindowBean.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/v2x/RoadV2NEventWindowBean.kt @@ -10,13 +10,14 @@ data class RoadV2NEventWindowBean( var iconResId: Int, //事件icon res id var hintStr: String, //事件提示文案 var isNeedTTS: Boolean = false, //事件文案是否需要同步tts + var ttsStr: String = "", //TTS的文案 var contentImageUrl: String, // Image 类型时图片 url var cameraIp: String, // 路侧camera ip,用于请求获取拉流地址 var lon: Double, //事件坐标-经度 var lat: Double, //事件坐标-纬度 ) { override fun toString(): String { - return "RoadV2NEventWindowBean(eventType=$eventType, eventId='$eventId', timestamp=$timestamp, iconResId='$iconResId', hintStr='$hintStr', isNeedTTS=$isNeedTTS, contentImageUrl='$contentImageUrl', cameraIp='$cameraIp', lon=$lon, lat=$lat)" + return "RoadV2NEventWindowBean(eventType=$eventType, eventId='$eventId', timestamp=$timestamp, iconResId=$iconResId, hintStr='$hintStr', isNeedTTS=$isNeedTTS, ttsStr='$ttsStr', contentImageUrl='$contentImageUrl', cameraIp='$cameraIp', lon=$lon, lat=$lat)" } } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerRoadV2NEventWindowListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerRoadV2NEventWindowListenerManager.kt index 182f9dcbea..aa5f8cbe7a 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerRoadV2NEventWindowListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerRoadV2NEventWindowListenerManager.kt @@ -21,13 +21,15 @@ object CallerRoadV2NEventWindowListenerManager : CallerBase