降低获取定位的频率
This commit is contained in:
@@ -85,8 +85,7 @@ object CharterPassengerModel {
|
||||
ConcurrentHashMap<String, IBusPassengerControllerStatusCallback>()
|
||||
|
||||
// 当前位置坐标
|
||||
private var mLocationGCJ02: MogoLocation? = null //todo yakun 优化
|
||||
private var mLocationWgs: MogoLocation? = null //todo yakun 优化
|
||||
private var mLocationGCJ02: MogoLocation? = null
|
||||
|
||||
// 订单信息 有订单有线路结束订单
|
||||
@Volatile
|
||||
@@ -140,7 +139,6 @@ object CharterPassengerModel {
|
||||
CallerAutoPilotStatusListenerManager.removeListener(mGoAutopilotStatusListener)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
CallerPlanningRottingListenerManager.removeListener(moGoAutopilotPlanningListener)
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
private fun initListeners() {
|
||||
@@ -150,8 +148,7 @@ object CharterPassengerModel {
|
||||
// 自动驾驶状态变化监听
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, mGoAutopilotStatusListener)
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 10,mMapLocationListener)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, 2, mMapWGS84LocationListener)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 4 ,mMapLocationListener)
|
||||
// 自动驾驶路线规划接口 返回自动驾驶轨迹
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, moGoAutopilotPlanningListener)
|
||||
// 登录状态监听
|
||||
@@ -216,13 +213,6 @@ object CharterPassengerModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
private val mMapWGS84LocationListener: IMoGoChassisLocationWGS84Listener =
|
||||
object : IMoGoChassisLocationWGS84Listener {
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (null == gnssInfo) return
|
||||
mLocationWgs = gnssInfo
|
||||
}
|
||||
}
|
||||
|
||||
// 前一个自动驾驶状体
|
||||
@Volatile
|
||||
@@ -1099,7 +1089,7 @@ object CharterPassengerModel {
|
||||
}
|
||||
val parameters = AutopilotControlParameters()
|
||||
orderInfo?.let { orderInfo ->
|
||||
mLocationWgs?.let { startPoint ->
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().let { startPoint ->
|
||||
val startWgsLon: Double = startPoint.longitude
|
||||
val startWgsLat: Double = startPoint.latitude
|
||||
val endWgsLon: Double = orderInfo.wgs84Lon!!
|
||||
|
||||
Reference in New Issue
Block a user