diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java index a95b51813f..1d275b58ef 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java @@ -44,7 +44,7 @@ public class MogoRouteOverlayManager implements public void init() { CallerPlanningTrajectoryListenerManager.INSTANCE.addListener(TAG, this); CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this); - CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this); + CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, 20,this); } public static MogoRouteOverlayManager getInstance() { diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt index 6a108df146..8f0933ac44 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt @@ -32,7 +32,7 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, initMapView() CallerSkinModeListenerManager.addListener(TAG, this) - CallerChassisLocationWGS84ListenerManager.addListener(TAG, this) + CallerChassisLocationWGS84ListenerManager.addListener(TAG, 20,this) CallerChassisLamplightListenerManager.addListener(TAG, this) } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationGCJ02ListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationGCJ02ListenerManager.kt index f567eb2b19..c7f1bbd69b 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationGCJ02ListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationGCJ02ListenerManager.kt @@ -74,7 +74,19 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase 0) { + // 计算是否进入下一次回调周期 + val nowTime = TimeUtils.getNowMills() + if (nowTime - hzLastSendTime > hzTime) { + syncLocationCallback(tag, it, mGnssInfo!!, sourceType) + } + } else { + syncLocationCallback(tag, it, mGnssInfo!!, sourceType) + } } } } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationWGS84ListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationWGS84ListenerManager.kt index a0212d23ee..7c38e0fad2 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationWGS84ListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerChassisLocationWGS84ListenerManager.kt @@ -59,7 +59,19 @@ object CallerChassisLocationWGS84ListenerManager : CallerBase 0) { + // 计算是否进入下一次回调周期 + val nowTime = TimeUtils.getNowMills() + if (nowTime - hzLastSendTime > hzTime) { + syncLocationCallback(tag, it, mGnssInfo, sourceType) + } + } else { + syncLocationCallback(tag, it, mGnssInfo, sourceType) + } } } }