[8.2.2][fix]解决多次到站的问题
This commit is contained in:
@@ -72,13 +72,20 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
/**
|
||||
* 起始站点
|
||||
*/
|
||||
@Volatile
|
||||
private var startStation: BusStationBean? = null
|
||||
|
||||
/**
|
||||
* 结束站点
|
||||
*/
|
||||
@Volatile
|
||||
private var endStation: BusStationBean? = null
|
||||
|
||||
/**
|
||||
* 上次到站的siteId
|
||||
*/
|
||||
@Volatile
|
||||
var lastArrivedSiteId = -1
|
||||
|
||||
/**
|
||||
* 和[autopilotId]相关 默认为true
|
||||
@@ -155,7 +162,8 @@ object LineManager : CallerBase<ILineCallback>() {
|
||||
private val mMapLocationListener = object : IMoGoChassisLocationGCJ02Listener {
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
if (null == mogoLocation) return
|
||||
getStations { start, end ->
|
||||
getStations { _, end ->
|
||||
if (end.siteId == lastArrivedSiteId) return@getStations
|
||||
val startLon = end.gcjLon
|
||||
val startLat = end.gcjLat
|
||||
val distance = CoordinateUtils.calculateLineDistance(
|
||||
|
||||
@@ -266,6 +266,7 @@ object LineModel {
|
||||
it.value.onCompleteTaskFail()
|
||||
}
|
||||
}
|
||||
LineManager.lastArrivedSiteId = -1
|
||||
}
|
||||
|
||||
override fun onComplete() {
|
||||
@@ -296,6 +297,7 @@ object LineModel {
|
||||
"taskId:${currentTask?.taskId}--lineInfo:${LineManager.lineInfos}"
|
||||
OchChainLogManager.writeChainLog("结束任务", changeInfo)
|
||||
}
|
||||
LineManager.lastArrivedSiteId = -1
|
||||
onComplete()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -234,7 +234,6 @@ object OrderModel {
|
||||
d(TAG, "结束当前路线abortTask")
|
||||
removeTipRunnables()
|
||||
LineModel.endTask()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,6 +463,7 @@ object OrderModel {
|
||||
if (isArrivedStation) return@getStations
|
||||
|
||||
OchChainLogManager.writeChainLog("触发进站", type)
|
||||
LineManager.lastArrivedSiteId = end.siteId
|
||||
isArrivedStation = true
|
||||
isGoingToNextStation = false
|
||||
start.drivingStatus = TaskSiteDataBean.drivingStatusPassed
|
||||
@@ -542,6 +542,7 @@ object OrderModel {
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingVerifyMode(TAG, false)
|
||||
CallerSopSettingManager.invokeRoutingListener(false)
|
||||
MapMakerManager.removeAllMapMarkerByOwner(TAG)
|
||||
LineManager.lastArrivedSiteId = -1
|
||||
BusTrajectoryManager.stopTrajReqLoop()
|
||||
LoginStatusManager.loginOut()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user