From e00ab54382839ffc880d003f9ee3c8ec70ab5fc3 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Fri, 9 Dec 2022 15:42:04 +0800 Subject: [PATCH] =?UTF-8?q?[2.13.0][Update]=E8=A7=A3=E5=86=B3=E9=81=93?= =?UTF-8?q?=E8=B7=AF=E6=96=BD=E5=B7=A5=E4=B8=8D=E5=9C=A8=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E7=9B=92=E5=AD=90=E4=B8=AD=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=96=87?= =?UTF-8?q?=E6=A1=88=E4=B8=94=E4=B8=8DTTS=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scene/road/V2XRoadEventScenario.java | 2 +- .../data/map/entity/V2XRoadEventEntity.java | 32 ++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) 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; }