This commit is contained in:
lixiaopeng
2021-09-28 18:00:33 +08:00
parent 0b00f0dfb3
commit cb30cde82b

View File

@@ -261,10 +261,16 @@ class MogoPrivateObuManager private constructor() {
// 前方拥堵提醒
EventTypeEnum.TYPE_USECASE_ID_TJW.poiType -> {
alertContent = EventTypeEnum.getWarningContent(appId)
ttsContent = String.format(
EventTypeEnum.getWarningTts(appId),
info.threat_info.distance.toInt()
)
if (info.threat_info != null) {
if (info.threat_info.distance.toInt() != 0) {
ttsContent = String.format(
EventTypeEnum.getWarningTts(appId),
info.threat_info.distance.toInt()
)
} else {
ttsContent = "前方道路拥堵,请减速慢行"
}
}
}
}