adjust the vip to avoid push twice notice

This commit is contained in:
zhongchao
2022-01-06 19:45:14 +08:00
parent 89fb647a3f
commit 49e0ce026c

View File

@@ -128,13 +128,13 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
if (!turnLightFirst) {
// 首次判断,变灯
turnLightFirst = true
val controlTime = if (currentResult!!.isGreen()) 45 - currentResult.remain else 45
val controlTime = if (currentResult!!.isGreen()) 30 - currentResult.remain else 30
Logger.d(TAG, "触发变灯 , controlTime : $controlTime")
turnLight(controlTime)
}
lastResult?.let {
//如果上次结果和本次灯态结果变化比较大则已变灯控制HMI展示弹窗
if (abs(currentResult!!.remain - it.remain) > 5) {
if (abs(currentResult!!.remain - it.remain) > 5 && currentResult.isGreen()) {
Logger.d(TAG, "调用showWarningV2X to show")
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType.toInt(),
EventTypeEnum.TYPE_VIP_IDENTIFICATION.content,