From 620d1f8c3c1952d66d68b14a263ed7f4959d861e Mon Sep 17 00:00:00 2001 From: lianglihui Date: Tue, 8 Nov 2022 16:41:11 +0800 Subject: [PATCH] =?UTF-8?q?2.12.0=20fix=20ADCU=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E6=95=B0=E6=8D=AE=E5=92=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E7=8A=B6=E6=80=81=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=20=E5=B0=8F=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E8=A2=AB=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/smp/SmallMapFragment.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java index 17227329ec..cdc563718e 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java @@ -15,7 +15,10 @@ import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider; +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager; +import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; @@ -38,6 +41,7 @@ public class SmallMapFragment extends BaseFragment IMoGoAutopilotStatusListener { private final String TAG = "SmallMapFragment"; protected SmallMapDirectionView mSmallMapDirectionView; + private int autoPilotStatus = 0; @Override public void onAttach(Context context) { @@ -139,8 +143,11 @@ public class SmallMapFragment extends BaseFragment @Override public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) { - if (autoPilotStatusInfo.getPilotmode() != 1) { + autoPilotStatus = autoPilotStatusInfo.getPilotmode(); + if (autoPilotStatus != 1) { clearPolyline(); + }else if (autoPilotStatus == 1){ + CallerAutoPilotManager.INSTANCE.getGlobalPath(); } } @@ -172,7 +179,7 @@ public class SmallMapFragment extends BaseFragment for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) { latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude())); } - if (latLngList.size() > 0) { + if (latLngList.size() > 0 && autoPilotStatus ==1) { drawablePolyline(latLngList); } else { clearPolyline();