修复红绿灯倒数

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-09-27 12:04:48 +08:00
parent 2aaf7b13c3
commit aafb30ef70

View File

@@ -7,7 +7,6 @@ import com.mogo.eagle.core.function.api.hmi.warning.WarningStatusListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtils
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.LogUtils
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter
import com.mogo.module.common.drawer.TrafficMarkerDrawer
import com.mogo.module.common.enums.EventTypeEnum
@@ -515,8 +514,8 @@ class MogoPrivateObuManager private constructor() {
}
isGreenLight = false
CallerHmiManager.showWarningTrafficLight(1)
val red = currentLight.count_down.toInt() + 1
CallerHmiManager.changeCountdownRed(if (red >= 0) red else 0)
val red = currentLight.count_down.toInt()
CallerHmiManager.changeCountdownRed(red)
ttsContent = EventTypeEnum.getWarningTts(appId.toString())
alertContent = EventTypeEnum.getWarningContent(appId.toString())
CallerHmiManager.changeCountdownGreen(0)
@@ -538,8 +537,8 @@ class MogoPrivateObuManager private constructor() {
}
isRedLight = false
CallerHmiManager.showWarningTrafficLight(3)
val green = currentLight.count_down.toInt() + 1
CallerHmiManager.changeCountdownGreen(if (green >= 0) green else 0)
val green = currentLight.count_down.toInt()
CallerHmiManager.changeCountdownGreen(green)
//防止数据出现问题的容错
CallerHmiManager.changeCountdownRed(0)
CallerHmiManager.changeCountdownYellow(0)
@@ -581,8 +580,8 @@ class MogoPrivateObuManager private constructor() {
0x3 -> {
CallerHmiManager.disableWarningV2X(appId.toString())
CallerHmiManager.showWarningTrafficLight(2)
val yellow = currentLight.count_down.toInt() + 1
CallerHmiManager.changeCountdownYellow(if (yellow >= 0) yellow else 0)
val yellow = currentLight.count_down.toInt()
CallerHmiManager.changeCountdownYellow(yellow)
CallerHmiManager.changeCountdownGreen(0)
CallerHmiManager.changeCountdownRed(0)
}