From cceb92531be1bc08b282255e76b510f530b80275 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Mon, 13 Mar 2023 15:13:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20[Change]=20[=201?= =?UTF-8?q?=E3=80=81=E7=BB=9F=E4=B8=80=E9=99=8D=E4=BD=8E=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E7=9A=84=E9=A2=91=E7=8E=87=E4=B8=BA5Hz?= =?UTF-8?q?=E5=8D=B3200ms=E4=B8=80=E6=AC=A1=EF=BC=8C=E6=9D=A5=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=9B=A0=E9=A2=91=E6=94=BE=E5=9B=9E=E8=B0=83hreadUtil?= =?UTF-8?q?s.runOnUiThread=20=E3=80=81UiThreadHandler.post=E5=AF=BC?= =?UTF-8?q?=E8=87=B4UI=E5=8D=A1=E6=AD=BB=E9=97=AE=E9=A2=98=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../mogo/eagle/core/function/view/MapBizView.kt | 2 +- .../CallerChassisLocationGCJ02ListenerManager.kt | 14 +++++++++++++- .../CallerChassisLocationWGS84ListenerManager.kt | 14 +++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) 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 0c20a62a84..13693d165d 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 @@ -73,7 +73,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) + } } } } From 07eebc1584e1aec0d26c68c8461b1f37db0199f2 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Mon, 13 Mar 2023 15:18:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20[Change]=20[=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E5=BC=95=E5=AF=BC=E7=BA=BF=E7=BB=98?= =?UTF-8?q?=E5=88=B6=E9=A2=91=E7=8E=87=E4=B8=BA20hz=EF=BC=8C=E4=B8=8E?= =?UTF-8?q?=E8=87=AA=E8=BD=A6=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/business/routeoverlay/MogoRouteOverlayManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {