This commit is contained in:
lixiaopeng
2021-09-24 19:14:57 +08:00
committed by 董宏宇
parent cf06a61897
commit fbfc6cdd0d

View File

@@ -295,7 +295,7 @@ class MogoPrivateObuManager private constructor() {
info.threat_info.app_id,
info.status,
info.ext_info.lights,
info.ext_info.lightIndex
info.ext_info.getLightIndex()
)
}
}
@@ -513,7 +513,7 @@ class MogoPrivateObuManager private constructor() {
var alertContent = ""
//这里需要根据真实数据确定 indicator 取值方式
if (indicator != -1 && lights.size >= indicator) {
val currentLight = lights[indicator]
val currentLight = lights[0]
LogUtils.dTag(
MogoObuConst.TAG_MOGO_OBU,
"currentLight = $currentLight ---currentLight.phase = ${currentLight.phase} --- indicator = $indicator ---appId = $appId"
@@ -531,9 +531,13 @@ class MogoPrivateObuManager private constructor() {
}
isGreenLight = false
CallerHmiManager.showWarningTrafficLight(1)
CallerHmiManager.changeCountdownRed(currentLight.count_down.toInt())
var red = currentLight.count_down.toInt() + 1
CallerHmiManager.changeCountdownRed(if (red >= 0) red else 0)
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
alertContent = EventTypeEnum.getWarningContent(appId.toString())
CallerHmiManager.changeCountdownGreen(0)
CallerHmiManager.changeCountdownYellow(0)
CallerHmiManager.showWarningV2X(
appId,
alertContent,
@@ -550,7 +554,8 @@ class MogoPrivateObuManager private constructor() {
}
isRedLight = false
CallerHmiManager.showWarningTrafficLight(3)
CallerHmiManager.changeCountdownGreen(currentLight.count_down.toInt() + 1)
var green = currentLight.count_down.toInt() + 1
CallerHmiManager.changeCountdownGreen(if (green >= 0) green else 0)
//防止数据出现问题的容错
CallerHmiManager.changeCountdownRed(0)
CallerHmiManager.changeCountdownYellow(0)
@@ -592,7 +597,8 @@ class MogoPrivateObuManager private constructor() {
0x3 -> {
CallerHmiManager.disableWarningV2X(appId.toString())
CallerHmiManager.showWarningTrafficLight(2)
CallerHmiManager.changeCountdownYellow(currentLight.count_down.toInt() + 1)
var yellow = currentLight.count_down.toInt() + 1
CallerHmiManager.changeCountdownYellow(if (yellow >= 0) yellow else 0)
CallerHmiManager.changeCountdownGreen(0)
CallerHmiManager.changeCountdownRed(0)
}