[3.3.0] fix bug of request global path
This commit is contained in:
@@ -41,22 +41,23 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化:$state,准备请求全局路线")
|
||||
createSubscribe?.let {
|
||||
if (!it.isDisposed) {
|
||||
bizLog(SceneConstant.M_D_C + TAG, "自动驾驶状态变化,取消前置轨迹请求,间隔2s重新请求底盘轨迹")
|
||||
createSubscribe?.dispose()
|
||||
}
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
createSubscribe = Observable.timer(2000L, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe {
|
||||
bizLog(SceneConstant.M_D_C + TAG, "请求底盘轨迹")
|
||||
CallerAutoPilotControlManager.getGlobalPath()
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
createSubscribe = Observable.timer(2000L, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe {
|
||||
bizLog(SceneConstant.M_D_C + TAG, "请求底盘轨迹")
|
||||
CallerAutoPilotControlManager.getGlobalPath()
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user