探路事件,取消本机与事件连线

This commit is contained in:
liujing
2020-09-22 17:41:40 +08:00
parent bfc346e48a
commit 8dbc6b8b07
4 changed files with 28 additions and 14 deletions

View File

@@ -40,6 +40,12 @@ public class V2XMessageEntity<T> implements Serializable {
*/
boolean isNeedCompareSameScenario = true;
//是否播报tts
private boolean onlyShow = false;
//本机与事件是否连线
private boolean needAddLine = true;
/**
* 场景具体的数据内容
*/
@@ -91,6 +97,22 @@ public class V2XMessageEntity<T> 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 场景类型
*/

View File

@@ -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;
}

View File

@@ -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);
//更新数据

View File

@@ -89,7 +89,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> 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<V2XRoadEventEntity> imp
public void onViewAdded(View view) {
Logger.d(MODULE_NAME, "展示 Window 动画结束");
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
drawPOI();
if (getV2XMessageEntity() != null && getV2XMessageEntity().isNeedAddLine() == true){
drawPOI();
}
}
}