From 8dbc6b8b07cba67347863d45b79b40267c0ea091 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 22 Sep 2020 17:41:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A2=E8=B7=AF=E4=BA=8B=E4=BB=B6,=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=9C=AC=E6=9C=BA=E4=B8=8E=E4=BA=8B=E4=BB=B6=E8=BF=9E?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/entity/V2XMessageEntity.java | 22 +++++++++++++++++++ .../common/entity/V2XRoadEventEntity.java | 10 --------- .../tanlu/fragment/TanluListWindow.java | 4 ++-- .../scene/road/V2XRoadEventScenario.java | 6 +++-- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java index e7cd5271fe..98f567ac0b 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java @@ -40,6 +40,12 @@ public class V2XMessageEntity implements Serializable { */ boolean isNeedCompareSameScenario = true; + //是否播报tts + private boolean onlyShow = false; + + //本机与事件是否连线 + private boolean needAddLine = true; + /** * 场景具体的数据内容 */ @@ -91,6 +97,22 @@ public class V2XMessageEntity implements Serializable { return Objects.hash(type, content); } + public boolean isOnlyShow() { + return onlyShow; + } + + public void setOnlyShow(boolean onlyShow) { + this.onlyShow = onlyShow; + } + + public boolean isNeedAddLine() { + return needAddLine; + } + + public void setNeedAddLine(boolean needAddLine) { + this.needAddLine = needAddLine; + } + /** * V2X 场景类型 */ 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 5322bbd734..80039b4244 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 @@ -25,8 +25,6 @@ public class V2XRoadEventEntity implements Serializable { // tts 提示 private String tts; - //是否播报tts - private boolean onlyShow = false; // ADAS 展示文案 private String alarmContent; // 距离当前车辆的距离 @@ -176,14 +174,6 @@ 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 e17851e9fe..d532afd8a4 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,7 +375,6 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity(); roadEventEntity.setNoveltyInfo(exploreWay); roadEventEntity.setPoiType(exploreWay.getPoiType()); - roadEventEntity.setOnlyShow(true); roadEventEntity.setExpireTime(20000); //地理位置 MarkerLocation location = exploreWay.getLocation(); @@ -384,7 +383,8 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL V2XMessageEntity v2XMessageEntity = new V2XMessageEntity(); v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING); v2XMessageEntity.setShowState(true); - v2XMessageEntity.setNeedCompareSameScenario(false); + v2XMessageEntity.setOnlyShow(true); + v2XMessageEntity.setNeedAddLine(false); v2XMessageEntity.setContent(roadEventEntity); //更新数据 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 9a2175ef89..5e93bb6900 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 @@ -89,7 +89,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp try { if (getV2XMessageEntity() != null && getV2XMessageEntity().getContent() != null) { //只展示不播报 不广播 - boolean onlyShow = getV2XMessageEntity().getContent().isOnlyShow(); + boolean onlyShow = getV2XMessageEntity().isOnlyShow(); if (onlyShow == false){ // 设置TTS getV2XMessageEntity().getContent().getTts(false); @@ -204,7 +204,9 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp public void onViewAdded(View view) { Logger.d(MODULE_NAME, "展示 Window 动画结束"); if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) { - drawPOI(); + if (getV2XMessageEntity() != null && getV2XMessageEntity().isNeedAddLine() == true){ + drawPOI(); + } } }