[3.3.0]merge
This commit is contained in:
@@ -10,11 +10,11 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.business.cachemap.CacheHDMapManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.zhidaoauto.map.operational.open.GatherApi
|
||||
@@ -27,7 +27,7 @@ import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_MAP_DATA_COLLECT_PROVIDER)
|
||||
class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
|
||||
IMoGoChassisLocationWGS84Listener, IMoGoTokenCallback,
|
||||
IMoGoAutopilotRecordListener {
|
||||
|
||||
companion object {
|
||||
@@ -53,7 +53,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
|
||||
executor.set(context?.let {
|
||||
@@ -79,7 +79,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerLogger.d("$M_MAP$TAG", "--------- onDestroy --------")
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
executor.get()?.setOnTaskListener(null)
|
||||
listeners.clear()
|
||||
@@ -181,15 +181,18 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
}
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
|
||||
if (gnssInfo != null) {
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (gnssInfo.gnssInfo != null
|
||||
&& gnssInfo.gnssInfo.longitude != 0.0
|
||||
&& gnssInfo.gnssInfo.latitude != 0.0
|
||||
) {
|
||||
executor.get()?.updateLocation(
|
||||
gnssInfo.longitude,
|
||||
gnssInfo.latitude,
|
||||
gnssInfo.altitude,
|
||||
gnssInfo.heading.toFloat(),
|
||||
gnssInfo.gnssSpeed,
|
||||
false
|
||||
gnssInfo.gnssInfo.longitude,
|
||||
gnssInfo.gnssInfo.latitude,
|
||||
gnssInfo.gnssInfo.altitude,
|
||||
gnssInfo.gnssInfo.heading.toFloat(),
|
||||
gnssInfo.gnssInfo.gnssSpeed.toFloat(),
|
||||
true
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -225,4 +228,5 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
object START : Status() //开始状态
|
||||
object FINISH : Status() //完成状态
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user