[6.5.0]兼容融合红绿灯,监测到不发数据后,隐藏红绿灯视图
This commit is contained in:
@@ -174,6 +174,32 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
isPrompted = false
|
||||
}else{
|
||||
//倒计时,超时还未更新数据则隐藏红绿灯
|
||||
lastLightTime = System.currentTimeMillis()
|
||||
if (lightCountDownTimer == null){
|
||||
UiThreadHandler.post {
|
||||
lightCountDownTimer = object : CountDownTimer(300000, 1000) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
if ((System.currentTimeMillis() - lastLightTime) > 1500) {
|
||||
//隐藏红绿灯显示
|
||||
hide("倒计时结束隐藏", DataSourceType.TELEMATIC_UNION_V2N)
|
||||
lightCountDownTimer?.cancel()
|
||||
lightCountDownTimer = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
//隐藏红绿灯显示
|
||||
hide("倒计时结束隐藏", DataSourceType.TELEMATIC_UNION_V2N)
|
||||
lightCountDownTimer?.cancel()
|
||||
lightCountDownTimer = null
|
||||
}
|
||||
|
||||
}
|
||||
lightCountDownTimer?.start()
|
||||
}
|
||||
}
|
||||
|
||||
//有下一和下二灯态,则为融合V2N红绿灯数据
|
||||
onFusionTrafficLight(convert(light.state),light.duration.toInt(),
|
||||
convert(light.nextState),light.nextDuration.toInt(),
|
||||
|
||||
Reference in New Issue
Block a user