[6.2.0] 演练任务拉取时间支持配置, 默认45s

This commit is contained in:
wangmingjun
2023-11-10 18:29:52 +08:00
parent eb09ced3a4
commit dc12815ff9

View File

@@ -7,6 +7,7 @@ import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.unmanned.CallerUnmannedListenerManager
import com.mogo.eagle.core.network.utils.GsonUtil
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
@@ -301,9 +302,9 @@ class TaxiCurrentTaskViewModel : BaseViewModel<UnmannedState, TaskUiIntent>(),
}else{ // 在已经接到订单的其他情况下, 取消倒计时任务拉取
TaxiTaskModel.removePrepareTaskDelay()
}
}else{ //演练任务拉取
}else{ //演练任务拉取 6.2.0使用配置的时间拉取, 默认45s
TaxiTaskModel.startPrepareTaskDelay(
TaxiUnmannedConst.TIMER_PREPARE_VIRTUAL_TASK_INTERVAL, result?.endSite!!.siteId)
CallerUnmannedListenerManager.getPullTime().toLong(), result?.endSite!!.siteId)
}
clearDemoModeAndACParameters()
@@ -334,8 +335,8 @@ class TaxiCurrentTaskViewModel : BaseViewModel<UnmannedState, TaskUiIntent>(),
updateTaskAndOrderUi(null)
//获取新的任务
val currentTaskWithOrder = TaxiTaskModel.getCurrentTaskWithOrder()
currentTaskWithOrder?.endSite?.also {
TaxiTaskModel.startPrepareTaskDelay(TaxiUnmannedConst.TIMER_PREPARE_VIRTUAL_TASK_INTERVAL,
currentTaskWithOrder?.endSite?.also {//使用配置的时间拉取, 默认是45s
TaxiTaskModel.startPrepareTaskDelay(CallerUnmannedListenerManager.getPullTime().toLong(),
it.siteId)
}
}