[2.13.0][Update]解决道路施工不在消息盒子中不显示文案且不TTS的问题

This commit is contained in:
chenfufeng
2022-12-09 15:42:04 +08:00
parent c78405a0f3
commit e00ab54382
2 changed files with 32 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
boolean onlyShow = getV2XMessageEntity().isOnlyShow();
if (!onlyShow) {
// 设置TTS
getV2XMessageEntity().getContent().getTts();
getV2XMessageEntity().getContent().getTts(false);
}
showWindow();
String poiType = getV2XMessageEntity().getContent().getPoiType();

View File

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