[MapDataUpdate]升级sdk版本
This commit is contained in:
@@ -29,6 +29,7 @@ import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.check.CallerCheckManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
@@ -279,6 +280,9 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
}
|
||||
}
|
||||
}
|
||||
if (record.type == 2 && (record.stat == 101 || record.stat == 100)) {
|
||||
CallerMapDataCollectorManager.finish(record.id, record.stat, "", record.fileName ?: "", record.note ?: "")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
|
||||
@@ -6,14 +6,17 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.zhidaoauto.map.operational.MapCollectionTaskRecive
|
||||
import com.zhidaoauto.map.operational.abs.OnTaskListener
|
||||
import com.zhidaoauto.map.operational.open.GatherApi
|
||||
import com.zhidaoauto.map.operational.open.GatherParams
|
||||
import com.zhidaoauto.map.operational.open.GatherParams.Companion
|
||||
import com.zhidaoauto.map.operational.open.abs.OnTaskListener
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
@@ -26,7 +29,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
}
|
||||
|
||||
private val executor by lazy {
|
||||
AtomicReference<MapCollectionTaskRecive?>(null)
|
||||
AtomicReference<GatherApi>(null)
|
||||
}
|
||||
|
||||
private val listeners by lazy {
|
||||
@@ -39,9 +42,18 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
|
||||
override val functionName: String = TAG
|
||||
|
||||
@Volatile
|
||||
private var hasInit = false
|
||||
|
||||
override fun init(context: Context?) {
|
||||
CallerMapLocationListenerManager.addListener(functionName, this)
|
||||
executor.set(context?.let { MapCollectionTaskRecive(it) })
|
||||
executor.set(context?.let {
|
||||
GatherApi.also { itx ->
|
||||
itx.init(it,
|
||||
GatherParams.init()
|
||||
.setDebugMode(DebugConfig.isDebug())
|
||||
.setCoordinateType(GatherParams.COORDINATETYPE_GCJ02))
|
||||
} })
|
||||
executor.get()?.setOnTaskListener(this)
|
||||
val carSn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
if (!TextUtils.isEmpty(carSn)) {
|
||||
@@ -55,10 +67,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
override fun onDestroy() {
|
||||
CallerMapLocationListenerManager.removeListener(TAG)
|
||||
Logger.d(TAG, "--------- onDestroy --------")
|
||||
executor.get()?.let {
|
||||
it.setOnTaskListener(null)
|
||||
it.destory()
|
||||
}
|
||||
executor.get()?.setOnTaskListener(null)
|
||||
listeners.clear()
|
||||
map.clear()
|
||||
}
|
||||
@@ -129,10 +138,19 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
map[id] = Status.START
|
||||
}
|
||||
|
||||
override fun setIsInit() {
|
||||
if (!hasInit) {
|
||||
executor.get()?.also {
|
||||
hasInit = true
|
||||
Logger.d(TAG, "告之地图sdk,定义数据可以用了")
|
||||
it.setIsInit()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?) {
|
||||
location ?: return
|
||||
executor.get()?.onMapChange(
|
||||
executor.get()?.updateLocation(
|
||||
location.longitude,
|
||||
location.latitude,
|
||||
location.bearing,
|
||||
|
||||
@@ -19,6 +19,11 @@ interface IMoGoMapDataCollectProvider: IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun unRegisterOnMapCollectTaskListener(listener: OnMapCollectCmdListener?)
|
||||
|
||||
/**
|
||||
* 此接口用于定位准确的时候回调
|
||||
*/
|
||||
fun setIsInit()
|
||||
|
||||
/**
|
||||
* 此接口是自动驾驶模块使用,用于把自动驾驶模块收集的数据给地图组
|
||||
*/
|
||||
|
||||
@@ -26,4 +26,8 @@ object CallerMapDataCollectorManager {
|
||||
fun finish(id: Int, state: Int, gpsPath: String, videoPath: String, reason: String) {
|
||||
provider?.finish(id, state, gpsPath, videoPath, reason)
|
||||
}
|
||||
|
||||
fun setIsInit() {
|
||||
provider?.setIsInit()
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ MOGO_LOCATION_VERSION=1.3.18
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.0.5.1
|
||||
MAP_SDK_OPERATION_VERSION=1.0.11
|
||||
MAP_SDK_OPERATION_VERSION=1.0.12
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.mogo.eagle.core.data.config.HdMapBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.map.CallerLocationUpdaterManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapStyleListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
@@ -920,6 +921,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
// 使用外部定位数据修改自车位置
|
||||
mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
|
||||
CallerLocationUpdaterManager.INSTANCE.updateLocation(bean);
|
||||
CallerMapDataCollectorManager.INSTANCE.setIsInit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user