[dev_arch_opt_3.0]

[Change]
[
1、删除旧版本定位注册
]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-01-28 18:40:32 +08:00
parent 0e7664615f
commit 981b876a76
14 changed files with 28 additions and 41 deletions

View File

@@ -7,12 +7,12 @@ import com.mogo.commons.constants.HostConst
import com.mogo.commons.utils.RetryWithDelay
import com.mogo.eagle.core.data.camera.CameraEntity
import com.mogo.eagle.core.data.camera.ReqLiveCarBean
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.function.biz.monitoring.net.ICameraListServices
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MONITOR
import com.mogo.eagle.function.biz.monitoring.net.ICameraListServices
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -90,7 +90,7 @@ class CronTaskManager {
* 请求路口一定范围内的设备信息(包含:摄像头、灯)
*/
private fun requestDeviceList() {
CallerMapLocationListenerManager.getCurrentLocation()?.let { location ->
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
disposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
.create(ICameraListServices::class.java)
.getDeviceList(location.longitude, location.latitude, 500)
@@ -124,7 +124,7 @@ class CronTaskManager {
}
private fun requestCarCameraList() {
CallerMapLocationListenerManager.getCurrentLocation()?.let { location ->
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
carDisposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
.create(ICameraListServices::class.java)
.getCarCameraList(ReqLiveCarBean(location.longitude, location.latitude))

View File

@@ -16,16 +16,15 @@ import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.LocationUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.zhjt.service_biz.BizConfig
import mogo.telematics.pad.MessagePad
import kotlin.math.abs
@@ -275,7 +274,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
fun onDestroy() {
CallVipSetListenerManager.removeListener(TAG)
CallerTrafficLightListenerManager.removeListener(TAG)
CallerMapLocationListenerManager.removeListener(TAG, false)
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
}
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {

View File

@@ -21,17 +21,17 @@ import com.mogo.eagle.core.data.trafficlight.isRed
import com.mogo.eagle.core.data.v2x.VipMessage
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
import com.zhjt.service_biz.BizConfig
class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListener,
@@ -195,9 +195,9 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
fun turnLight(controlTime: Int) {
if (result == null || mContext == null) return
val mogoLocation = CallerMapLocationListenerManager.getCurrentLocation()
val mogoLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
if (mogoLocation != null) {
val bearing = mogoLocation.bearing.toDouble()
val bearing = mogoLocation.heading
CallerLogger.d("$M_V2X$TAG", "-- turnLight -- ")
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
result!!.lightId, result!!.crossId, bearing, controlTime,