From 5c5697fe3fb596873f33ef87fd775cecb9cbdd65 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 22 Sep 2020 15:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=8F=AA=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E6=92=AD=E6=8A=A5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/common/entity/V2XRoadEventEntity.java | 11 +++++++++++ .../module/tanlu/fragment/TanluListWindow.java | 1 + .../scene/road/V2XRoadEventScenario.java | 16 ++++++++++------ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java index 2546f5bebf..5322bbd734 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java @@ -24,6 +24,9 @@ public class V2XRoadEventEntity implements Serializable { private MarkerExploreWay noveltyInfo; // tts 提示 private String tts; + + //是否播报tts + private boolean onlyShow = false; // ADAS 展示文案 private String alarmContent; // 距离当前车辆的距离 @@ -173,6 +176,14 @@ public class V2XRoadEventEntity implements Serializable { this.tts = tts; } + public boolean isOnlyShow() { + return onlyShow; + } + + public void setOnlyShow(boolean onlyShow) { + this.onlyShow = onlyShow; + } + public boolean isShowEventButton() { return isShowEventButton; } diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java index 94ddeb31bc..1aa79306dd 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java @@ -375,6 +375,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity(); roadEventEntity.setNoveltyInfo(exploreWay); roadEventEntity.setPoiType(exploreWay.getPoiType()); + roadEventEntity.setOnlyShow(true); V2XMessageEntity v2XMessageEntity = new V2XMessageEntity(); v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING); diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java index a0ab65878a..9a2175ef89 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadEventScenario.java @@ -88,12 +88,16 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp public void show() { try { if (getV2XMessageEntity() != null && getV2XMessageEntity().getContent() != null) { - // 设置TTS - getV2XMessageEntity().getContent().getTts(false); - // 广播给ADAS - ADASUtils.broadcastToADAS( - V2XServiceManager.getContext(), - getV2XMessageEntity().getContent()); + //只展示不播报 不广播 + boolean onlyShow = getV2XMessageEntity().getContent().isOnlyShow(); + if (onlyShow == false){ + // 设置TTS + getV2XMessageEntity().getContent().getTts(false); + // 广播给ADASzzz + ADASUtils.broadcastToADAS( + V2XServiceManager.getContext(), + getV2XMessageEntity().getContent()); + } saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING, getV2XMessageEntity().getContent().getNoveltyInfo());