Merge branch 'dev_robotaxi-d_230711_3.4.0' into dev_20230708_unmanned_3.5.0
This commit is contained in:
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import perception.TrafficLightOuterClass
|
||||
import perception.TrafficLightOuterClass.TrafficLight
|
||||
@@ -65,7 +66,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
//obu数据
|
||||
@Volatile
|
||||
private var hasObuLightStatus: Boolean = false
|
||||
|
||||
//红绿灯定时器,超时未更新隐藏红绿灯
|
||||
@Volatile
|
||||
private var lightCountDownTimer: CountDownTimer? = null
|
||||
private var lastLightTime: Long = System.currentTimeMillis()
|
||||
|
||||
@@ -235,25 +237,27 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
//倒计时,超时还未更新数据则隐藏红绿灯
|
||||
lastLightTime = System.currentTimeMillis()
|
||||
if (lightCountDownTimer == null) {
|
||||
lightCountDownTimer = object : CountDownTimer(300000, 1000) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
if ((System.currentTimeMillis() - lastLightTime) > 1500) {
|
||||
UiThreadHandler.post{
|
||||
lightCountDownTimer = object : CountDownTimer(300000, 1000) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
if ((System.currentTimeMillis() - lastLightTime) > 1500) {
|
||||
//隐藏红绿灯显示
|
||||
hide("倒计时结束隐藏", lightSource)
|
||||
lightCountDownTimer?.cancel()
|
||||
lightCountDownTimer = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
//隐藏红绿灯显示
|
||||
hide("倒计时结束隐藏", lightSource)
|
||||
lightCountDownTimer?.cancel()
|
||||
lightCountDownTimer = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
//隐藏红绿灯显示
|
||||
hide("倒计时结束隐藏", lightSource)
|
||||
lightCountDownTimer?.cancel()
|
||||
lightCountDownTimer = null
|
||||
}
|
||||
|
||||
lightCountDownTimer?.start()
|
||||
}
|
||||
lightCountDownTimer?.start()
|
||||
}
|
||||
|
||||
CallerTrafficLightListenerManager.showTrafficLight(light, lightSource)
|
||||
|
||||
Reference in New Issue
Block a user