This commit is contained in:
zhongchao
2021-11-12 16:14:10 +08:00
parent 4d6b92f5fe
commit b18219c8ec

View File

@@ -5,6 +5,7 @@ import android.location.Location
import com.mogo.cloud.commons.utils.CoordinateUtils
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.data.trafficlight.currentRoadTrafficLight
import com.mogo.eagle.core.data.trafficlight.turnRedAtOnce
import com.mogo.eagle.core.data.v2x.VipMessage
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
@@ -86,9 +87,12 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
turnLightFirst = true
turnLight()
}
val currentResult = trafficLightResult.currentRoadTrafficLight()
val lastResult = result!!.currentRoadTrafficLight()
this.result = trafficLightResult
//如果上次结果和本次灯态结果变化比较大则已变灯控制HMI展示弹窗
if ((result!!.laneList.mid.remain - trafficLightResult.laneList.mid.remain) > 3) {
if (lastResult!!.remain - currentResult!!.remain > 3) {
CallerHmiManager.showWarningV2X(EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType.toInt(),
EventTypeEnum.TYPE_VIP_IDENTIFICATION.content,
EventTypeEnum.TYPE_VIP_IDENTIFICATION.tts,