diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java index 8d1031e440..1a2289cbbf 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java @@ -72,7 +72,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp boolean onlyShow = getV2XMessageEntity().isOnlyShow(); if (!onlyShow) { // 设置TTS - getV2XMessageEntity().getContent().getTts(); + getV2XMessageEntity().getContent().getTts(false); } showWindow(); String poiType = getV2XMessageEntity().getContent().getPoiType(); diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java index b6ea46986b..eea9b6b93e 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java @@ -3,6 +3,8 @@ package com.mogo.eagle.core.data.map.entity; import android.text.TextUtils; +import com.mogo.eagle.core.data.enums.EventTypeEnum; + import java.io.Serializable; import java.util.Objects; @@ -54,6 +56,33 @@ public class V2XRoadEventEntity implements Serializable { this.poiType = poiType; } + public String getTts(boolean haveLiveCar) { + if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(poiType)) { + tts = EventTypeEnum.GHOST_PROBE.getTts(); + return tts; + } + tts = "前方#" + (int) getDistance() + "米#"; + tts += EventTypeEnum.getTts(getPoiType()); + if (haveLiveCar) { + tts += ",查看实况请说确定。"; + setShowEventButton(true); + } else { + tts += ",请注意躲避。"; + setShowEventButton(false); + } + return tts; + } + + /** + * 检测到附近#道路施工#,确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。 + */ + public String getTtsWithFeedback() { + tts = "检测到附近"; + tts += EventTypeEnum.getTtsWithFeedback(getPoiType()); + tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。"; + return tts; + } + public String getTts() { return tts; } @@ -70,7 +99,8 @@ public class V2XRoadEventEntity implements Serializable { isShowEventButton = showEventButton; } - public String getAlarmContent(){ //todo 缺少 + public String getAlarmContent() { + alarmContent = EventTypeEnum.getAlarmContent(getPoiType()); return alarmContent; }