From 5fcc0f42eaefdf0d15833f3a38a62de9421ee085 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Thu, 5 Jan 2023 18:17:27 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20[Change]=20[1?= =?UTF-8?q?=E3=80=81=E5=88=86=E7=A6=BB=E5=B7=A5=E6=8E=A7=E6=9C=BA=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E7=BA=BF=E3=80=81=E5=85=A8=E8=B7=AF=E5=BE=84=E8=A7=84?= =?UTF-8?q?=E5=88=92]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../passenger/model/BusPassengerModel.java | 23 +++++------ .../com/mogo/och/bus/model/BusOrderModel.java | 15 +++---- .../och/sweeper/model/SweeperOrderModel.java | 30 ++++---------- .../passenger/model/TaxiPassengerModel.java | 23 ++++------- .../com/mogo/och/taxi/model/TaxiModel.java | 16 +++----- .../biz/dispatch/DispatchAutoPilotManager.kt | 14 ++++--- .../autopilot/adapter/MoGoAdasListenerImpl.kt | 4 +- .../hmi/ui/setting/DebugSettingView.kt | 9 ++-- .../routeoverlay/MogoRouteOverlayManager.java | 17 ++++---- .../eagle/core/function/map/MapFragment.java | 16 +++----- .../core/function/smp/AMapCustomView.java | 17 +++----- .../function/smp/OverviewMapFragment.java | 2 - .../core/function/smp/SmallMapFragment.java | 16 +++----- ...ner.kt => IMoGoPlanningRottingListener.kt} | 12 +----- .../IMoGoPlanningTrajectoryListener.kt | 17 ++++++++ .../CallerAutopilotPlanningListenerManager.kt | 41 ------------------- .../CallerPlanningRottingListenerManager.kt | 27 ++++++++++++ ...CallerPlanningTrajectoryListenerManager.kt | 28 +++++++++++++ 18 files changed, 154 insertions(+), 173 deletions(-) rename core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/{IMoGoAutopilotPlanningListener.kt => IMoGoPlanningRottingListener.kt} (52%) create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningTrajectoryListener.kt delete mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPlanningListenerManager.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningRottingListenerManager.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningTrajectoryListenerManager.kt diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index 80b648d14c..5840a88cc7 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -1,5 +1,9 @@ package com.mogo.och.bus.passenger.model; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; +import static com.mogo.och.bus.passenger.constant.BusPassengerConst.QUERY_BUS_P_STATION_DELAY; +import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; + import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; @@ -21,11 +25,11 @@ import com.mogo.commons.module.status.StatusDescriptor; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; -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.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; 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.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.network.utils.GsonUtil; import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; @@ -49,6 +53,7 @@ import com.mogo.och.bus.passenger.network.BusPassengerServiceManager; import com.mogo.och.common.module.biz.network.OchCommonServiceCallback; import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager; import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; + import org.jetbrains.annotations.NotNull; import java.util.ArrayList; @@ -60,10 +65,6 @@ import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; import system_master.SystemStatusInfo; -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; -import static com.mogo.och.bus.passenger.constant.BusPassengerConst.QUERY_BUS_P_STATION_DELAY; -import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; - /** * Created on 2022/3/31 */ @@ -274,7 +275,7 @@ public class BusPassengerModel { CallerMapLocationListenerManager.INSTANCE.addListener(TAG, mMapLocationListener,false); //2021.11.1 自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener); AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext); } @@ -289,7 +290,7 @@ public class BusPassengerModel { .unregisterLifecycleListener(10010); CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener); - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors(); } @@ -396,11 +397,7 @@ public class BusPassengerModel { } }; - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener(){ - - @Override - public void onAutopilotTrajectory(@NonNull List trajectoryInfos) { - } + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener(){ @Override public void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp routeList) { diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index 148aa350ca..7b32cf7532 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -25,12 +25,12 @@ import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; -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.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; 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.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.NetworkUtils; @@ -156,7 +156,7 @@ public class BusOrderModel { MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener); //自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); //开启自驾后 异常信息返回 OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener); @@ -266,12 +266,7 @@ public class BusOrderModel { this.mControllerStatusCallback = callback; } - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() { - - @Override - public void onAutopilotTrajectory(@NonNull List trajectoryInfos) { - - } + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() { @Override public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) { @@ -339,7 +334,7 @@ public class BusOrderModel { CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false); //自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); loginService = null; OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null); diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java index 3d0ce3a4f7..8aee5fbc5a 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java @@ -4,18 +4,14 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS import static com.mogo.och.sweeper.constant.SweeperConst.STATION_STATUS_STOPPED; import android.content.Context; -import android.location.Location; import android.os.Handler; -import android.os.Message; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.amap.api.maps.model.LatLng; import com.elegant.network.utils.GsonUtil; import com.mogo.cloud.commons.utils.CoordinateUtils; import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.module.status.IMogoStatusChangedListener; import com.mogo.commons.module.status.MogoStatusManager; import com.mogo.commons.module.status.StatusDescriptor; @@ -24,36 +20,33 @@ import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener; +import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; 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.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.eagle.core.utilcode.util.NetworkUtils; import com.mogo.eagle.core.utilcode.util.ToastUtils; +import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; +import com.mogo.och.sweeper.bean.QueryLeaveAwayPassengersResponse; import com.mogo.och.sweeper.bean.SweeperOperationStatusResponse; import com.mogo.och.sweeper.bean.SweeperRoutePlanningUpdateReqBean; import com.mogo.och.sweeper.bean.SweeperRoutesResponse; import com.mogo.och.sweeper.bean.SweeperRoutesResult; import com.mogo.och.sweeper.bean.SweeperStationBean; -import com.mogo.och.sweeper.bean.QueryLeaveAwayPassengersResponse; import com.mogo.och.sweeper.callback.ICarOperationStatusCallback; -import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback; import com.mogo.och.sweeper.callback.IRefreshSweeperStationsCallback; import com.mogo.och.sweeper.callback.ISlidePannelHideCallback; +import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback; import com.mogo.och.sweeper.constant.SweeperConst; -import com.mogo.och.sweeper.net.SweeperServiceManager; import com.mogo.och.sweeper.net.ISweeperServiceCallback; +import com.mogo.och.sweeper.net.SweeperServiceManager; import com.mogo.och.sweeper.presenter.SweeperModelLoopManager; import com.mogo.och.sweeper.util.SweeperAnalyticsManager; import com.mogo.och.sweeper.util.SweeperTrajectoryManager; -import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; -import com.mogo.och.common.module.utils.PinYinUtil; -import com.zhjt.service.chain.ChainLog; -import com.zhjt.service.chain.TracingConstants; import java.io.IOException; import java.util.ArrayList; @@ -135,7 +128,7 @@ public class SweeperOrderModel { MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener); //自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); //2022.1.28 @@ -193,12 +186,7 @@ public class SweeperOrderModel { this.mControllerStatusCallback = callback; } - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() { - - @Override - public void onAutopilotTrajectory(@NonNull List trajectoryInfos) { - - } + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() { @Override public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) { @@ -263,7 +251,7 @@ public class SweeperOrderModel { CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false); //自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); } private Object readResolve() { diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java index 32bdacd61d..7a45977c70 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java @@ -1,5 +1,7 @@ package com.mogo.och.taxi.passenger.model; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P; + import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; @@ -23,13 +25,13 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; -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.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener; 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.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager; import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; @@ -38,11 +40,11 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import com.mogo.eagle.core.utilcode.util.NetworkUtils; import com.mogo.eagle.core.utilcode.util.ToastUtils; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; +import com.mogo.och.common.module.biz.network.OchCommonServiceCallback; import com.mogo.och.common.module.callback.OchAdasStartFailureCallback; import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager; import com.mogo.och.common.module.manager.OCHAdasAbilityManager; import com.mogo.och.common.module.map.AmapNaviToDestinationModel; -import com.mogo.och.common.module.biz.network.OchCommonServiceCallback; import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; import com.mogo.och.common.module.utils.PinYinUtil; import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean; @@ -50,8 +52,8 @@ import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRemainingResp; import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrderQueryRespBean; import com.mogo.och.taxi.passenger.bean.TaxiPassengerOrdersInServiceQueryRespBean; import com.mogo.och.taxi.passenger.bean.TaxiPassengerQueryOrderRouteResp; -import com.mogo.och.taxi.passenger.bean.TaxiPassengerStartReqBean; import com.mogo.och.taxi.passenger.bean.TaxiPassengerScoreUpdateOrderReqBean; +import com.mogo.och.taxi.passenger.bean.TaxiPassengerStartReqBean; import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerADASStatusCallback; import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerAutopilotPlanningCallback; import com.mogo.och.taxi.passenger.callback.IOCHTaxiPassengerControllerStatusCallback; @@ -84,8 +86,6 @@ import mogo.telematics.pad.MessagePad; import mogo_msg.MogoReportMsg; import system_master.SystemStatusInfo; -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P; - /** * Created by pangfan on 2021/8/19 * @@ -239,7 +239,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationListener,false); //2021.11.1 自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener); //增加限速监听 CallLimitingVelocityListenerManager.INSTANCE.addListener(TAG,limitingVelocityListener); @@ -260,7 +260,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback .unregisterLifecycleListener(10010); CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener); - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); CallLimitingVelocityListenerManager.INSTANCE.removeListener(limitingVelocityListener); AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors(); @@ -577,12 +577,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback } }; - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener(){ - - @Override - public void onAutopilotTrajectory(@NonNull List trajectoryInfos) { - - } + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener(){ @Override public void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp routeList) { diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 6b2e56777e..7da096c29c 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -27,12 +27,12 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; -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.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; 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.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; @@ -75,8 +75,8 @@ import com.mogo.och.taxi.constant.TaxiOrderStatusEnum; import com.mogo.och.taxi.constant.TaxiOrderTypeEnum; import com.mogo.och.taxi.constant.TaxtServingStatusManager; import com.mogo.och.taxi.network.TaxiServiceManager; -import com.mogo.och.taxi.utils.TaxiAnalyticsManager; import com.mogo.och.taxi.utils.OrderUtil; +import com.mogo.och.taxi.utils.TaxiAnalyticsManager; import com.mogo.och.taxi.utils.TaxiTrajectoryManager; import com.zhjt.service.chain.ChainLog; import com.zhjt.service.chain.TracingConstants; @@ -226,7 +226,7 @@ public class TaxiModel { CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener,false); //2021.11.1 自动驾驶路线规划接口 - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); //开启自驾后 异常信息返回 OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener); @@ -267,7 +267,7 @@ public class TaxiModel { OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType); CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener); - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null); AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors(); @@ -1252,12 +1252,8 @@ public class TaxiModel { public void onAutopilotStatusRespByQuery(@NonNull SystemStatusInfo.StatusInfo status) { } }; - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() { - @Override - public void onAutopilotTrajectory(@NonNull List trajectoryInfos) { - - } + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() { @Override public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt index e85fd7e0de..5d37582878 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt @@ -10,13 +10,13 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean 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.autopilot.IMoGoPlanningRottingListener import com.mogo.eagle.core.function.api.hmi.autopilot.IMoGoCheckAutoPilotBtnListener 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.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager +import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger @@ -30,8 +30,10 @@ import mogo.telematics.pad.MessagePad //负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗 class DispatchAutoPilotManager private constructor() : - IMogoOnMessageListener, IMoGoCheckAutoPilotBtnListener, - IMoGoAutopilotPlanningListener, IMoGoAutopilotStatusListener { + IMogoOnMessageListener, + IMoGoCheckAutoPilotBtnListener, + IMoGoPlanningRottingListener, + IMoGoAutopilotStatusListener { companion object { private const val TAG = "DispatchAutoPilotManager" @@ -77,7 +79,7 @@ class DispatchAutoPilotManager private constructor() : // 添加自动驾驶按钮选中监听 CallerHmiListenerManager.addListener(TAG, this) // 添加 规划路径相关回调 监听 - CallerAutopilotPlanningListenerManager.addListener(TAG, this) + CallerPlanningRottingListenerManager.addListener(TAG, this) // 添加 ADAS状态 监听 CallerAutoPilotStatusListenerManager.addListener(TAG, this) handler.sendEmptyMessageDelayed(MSG_TYPE_UPLOAD_AUTOPILOT_STATUS, 1000L) @@ -87,7 +89,7 @@ class DispatchAutoPilotManager private constructor() : // 添加自动驾驶按钮选中监听 CallerHmiListenerManager.removeListener(TAG) // 添加 规划路径相关回调 监听 - CallerAutopilotPlanningListenerManager.removeListener(TAG) + CallerPlanningRottingListenerManager.removeListener(TAG) // 添加 ADAS状态 监听 CallerAutoPilotStatusListenerManager.removeListener(TAG) } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt index 5416410b18..1ca3243662 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -42,11 +42,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListen import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyPlanningObj import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager.invokePNCActions -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics +import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager.invokeAutopilotRotting +import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager.invokeAutopilotTrajectory import com.mogo.eagle.core.function.call.autopilot.CallerStartAutopilotFailedListenerManager.invokeStartAutopilotFailed import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 50104895b4..93b37a0394 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -104,7 +104,8 @@ class DebugSettingView @JvmOverloads constructor( IMoGoAutopilotCarStateListener, IMoGoMapLocationListener, IMoGoAutopilotIdentifyListener, - IMoGoAutopilotPlanningListener, + IMoGoPlanningRottingListener, + IMoGoPlanningTrajectoryListener, IMoGoAutopilotVehicleStateListener, IMoGoDevaToolsFuncConfigListener, IMoGoChassisLamplightListener, @@ -198,7 +199,8 @@ class DebugSettingView @JvmOverloads constructor( // 添加 域控制器感知数据 监听 CallerAutopilotIdentifyListenerManager.addListener(TAG, this) // 添加 规划路径相关回调 监听 - CallerAutopilotPlanningListenerManager.addListener(TAG, this) + CallerPlanningRottingListenerManager.addListener(TAG, this) + CallerPlanningTrajectoryListenerManager.addListener(TAG, this) //添加 车辆底盘数据回调 监听 CallerAutopilotVehicleStateListenerManager.addListener(TAG, this) //添加 开发套件工具接口 监听 @@ -235,7 +237,8 @@ class DebugSettingView @JvmOverloads constructor( // 移除 域控制器感知数据 监听 CallerAutopilotIdentifyListenerManager.removeListener(TAG) // 移除 规划路径相关回调 监听 - CallerAutopilotPlanningListenerManager.removeListener(TAG) + CallerPlanningRottingListenerManager.removeListener(TAG) + CallerPlanningTrajectoryListenerManager.removeListener(TAG) // 移除 车辆底盘数据回调 监听 CallerAutopilotVehicleStateListenerManager.removeListener(TAG) // 移除 开发套件工具接口 监听 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 924d017003..116ba6c51f 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 @@ -5,14 +5,15 @@ import androidx.annotation.NonNull; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; -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.autopilot.IMoGoPlanningTrajectoryListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; 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.autopilot.CallerPlanningTrajectoryListenerManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; + import org.jetbrains.annotations.NotNull; + import java.util.LinkedList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -23,7 +24,9 @@ import mogo_msg.MogoReportMsg; import system_master.SystemStatusInfo; public class MogoRouteOverlayManager implements - IMoGoAutopilotPlanningListener, IMoGoAutopilotStatusListener, IMoGoMapLocationListener { + IMoGoPlanningTrajectoryListener, + IMoGoAutopilotStatusListener, + IMoGoMapLocationListener { private static volatile MogoRouteOverlayManager sInstance; private static final String TAG = "Route"; @@ -36,7 +39,7 @@ public class MogoRouteOverlayManager implements public void init() { - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this); + CallerPlanningTrajectoryListenerManager.INSTANCE.addListener(TAG, this); CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this); CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this, false); } @@ -84,10 +87,6 @@ public class MogoRouteOverlayManager implements } } - @Override - public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) {} - - @Override public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) { int mode = autoPilotStatusInfo.getPilotmode(); diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java index 4add2174dc..86224bbc38 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java @@ -12,13 +12,13 @@ import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.commons.mvp.MvpFragment; import com.mogo.eagle.core.data.constants.MoGoFragmentPaths; import com.mogo.eagle.core.data.map.CenterLine; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener; +import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider; import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener; -import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber; import com.mogo.eagle.core.function.business.MapPointCloudSubscriber; +import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber; import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager; -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager; +import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.map.CallerHDMapManager; import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager; import com.mogo.eagle.core.function.overview.InfStructureManager; @@ -33,8 +33,6 @@ import com.mogo.map.uicontroller.IMogoMapUIController; import com.zhidaoauto.map.sdk.open.MapAutoApi; import com.zhidaoauto.map.sdk.open.business.PointCloudHelper; -import java.util.List; - import mogo.telematics.pad.MessagePad; /** @@ -96,7 +94,7 @@ public class MapFragment extends MvpFragment } // 添加换肤监听 CallerSkinModeListenerManager.INSTANCE.addListener(TAG, this); - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); } @NonNull @@ -214,7 +212,7 @@ public class MapFragment extends MvpFragment viewModel.fetchInfStructures(); } - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() { + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() { @Override public void onAutopilotRotting(@Nullable MessagePad.GlobalPathResp globalPathResp) { @@ -223,8 +221,6 @@ public class MapFragment extends MvpFragment }); } - @Override - public void onAutopilotTrajectory(@NonNull List trajectoryInfos) {} }; @Override @@ -235,7 +231,7 @@ public class MapFragment extends MvpFragment @Override public void onDestroyView() { CallerSkinModeListenerManager.INSTANCE.removeListener(TAG); - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(TAG); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(TAG); if (mMogoMapView != null) { mMogoMapView.onDestroy(); mMogoMapView = null; diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java index e6d7bb9401..9dae3ccb16 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java @@ -32,9 +32,9 @@ import com.amap.api.maps.model.PolylineOptions; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.Infrastructure; import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener; +import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener; import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener; -import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager; +import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.function.map.R; @@ -45,8 +45,6 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import org.jetbrains.annotations.NotNull; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -132,7 +130,7 @@ public class AMapCustomView arrivedBitmap = BitmapDescriptorFactory.fromResource(R.drawable.arrow_arrived_img); unArrivedBitmap = BitmapDescriptorFactory.fromResource(R.drawable.amap_bus_smooth_route); } - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener); initAMapView(context); // 注册定位监听 CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this, false); @@ -217,12 +215,7 @@ public class AMapCustomView .icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_end))); } - private final IMoGoAutopilotPlanningListener moGoAutopilotPlanningListener = new IMoGoAutopilotPlanningListener() { - - @Override - public void onAutopilotTrajectory(@NotNull List trajectoryInfos) { - Log.d(TAG, "onAutopilotTrajectory"); - } + private final IMoGoPlanningRottingListener moGoAutopilotPlanningListener = new IMoGoPlanningRottingListener() { /** * 根据全路径获取起始点和经停点进行导航路线绘制 @@ -308,7 +301,7 @@ public class AMapCustomView super.onDetachedFromWindow(); // 注册定位监听 CallerMapLocationListenerManager.INSTANCE.removeListener(TAG, false); - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(TAG); + CallerPlanningRottingListenerManager.INSTANCE.removeListener(TAG); } @Override diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java index 37ab1567d9..a55727a560 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java @@ -15,7 +15,6 @@ import com.mogo.eagle.core.data.map.MogoLatLng; 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.map.R; import com.mogo.eagle.core.function.overview.InfStructureManager; import com.mogo.eagle.core.function.overview.ViewModelExtKt; @@ -160,6 +159,5 @@ public class OverviewMapFragment extends BaseFragment if (mAMapCustomView != null) { mAMapCustomView.onDestroy(); } - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(TAG); } } 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 2e8740625b..024c99fc99 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 @@ -12,11 +12,11 @@ import com.mogo.commons.mvp.BaseFragment; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.constants.MoGoFragmentPaths; 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.autopilot.IMoGoPlanningRottingListener; 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.CallerAutopilotPlanningListenerManager; +import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager; import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; @@ -35,7 +35,8 @@ import system_master.SystemStatusInfo; */ @Route(path = MoGoFragmentPaths.PATH_FRAGMENT_SMP) public class SmallMapFragment extends BaseFragment - implements IMogoSmallMapProvider, IMoGoAutopilotPlanningListener, + implements IMogoSmallMapProvider, + IMoGoPlanningRottingListener, IMoGoAutopilotStatusListener { private final String TAG = "SmallMapFragment"; protected SmallMapDirectionView mSmallMapDirectionView; @@ -65,7 +66,7 @@ public class SmallMapFragment extends BaseFragment super.initViews(savedInstanceState); mSmallMapDirectionView = mRootView.findViewById(R.id.smallMapDirectionView); mSmallMapDirectionView.onCreateView(savedInstanceState); - CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this); + CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, this); } @Override @@ -120,12 +121,7 @@ public class SmallMapFragment extends BaseFragment if (mSmallMapDirectionView != null) { mSmallMapDirectionView.onDestroy(); } - CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(TAG); - } - - @Override - public void onAutopilotTrajectory(List trajectoryInfos) { - + CallerPlanningRottingListenerManager.INSTANCE.removeListener(TAG); } @Override diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPlanningListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningRottingListener.kt similarity index 52% rename from core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPlanningListener.kt rename to core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningRottingListener.kt index 5c4cea0f2e..df6ff62108 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPlanningListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningRottingListener.kt @@ -3,17 +3,9 @@ package com.mogo.eagle.core.function.api.autopilot import mogo.telematics.pad.MessagePad /** - * 自动驾驶规划路线相关的监听 + * 工控机全局规划路径 */ -interface IMoGoAutopilotPlanningListener { - /** - * 工控机引导线数据 - * - * @param trajectoryInfos 引导线数据经纬度 - */ - fun onAutopilotTrajectory(trajectoryInfos: MutableList){ - - } +interface IMoGoPlanningRottingListener { /** * 2021/6/23 工控机经纬度 绘制时转成高德经纬度 diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningTrajectoryListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningTrajectoryListener.kt new file mode 100644 index 0000000000..547cadabeb --- /dev/null +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoPlanningTrajectoryListener.kt @@ -0,0 +1,17 @@ +package com.mogo.eagle.core.function.api.autopilot + +import mogo.telematics.pad.MessagePad + +/** + * 工控机引导线数据 + */ +interface IMoGoPlanningTrajectoryListener { + + /** + * 工控机引导线数据 + * + * @param trajectoryInfos 引导线数据经纬度 + */ + fun onAutopilotTrajectory(trajectoryInfos: MutableList) + +} \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPlanningListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPlanningListenerManager.kt deleted file mode 100644 index 212963419a..0000000000 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPlanningListenerManager.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.mogo.eagle.core.function.call.autopilot - -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener -import com.mogo.eagle.core.function.call.base.CallerBase -import mogo.telematics.pad.MessagePad - -/** - * @author xiaoyuzhou - * @date 2021/9/30 5:48 下午 - * 规划路径相关回调 - */ -object CallerAutopilotPlanningListenerManager : CallerBase() { - - /** - * 车前引导线 回调 - * @param trajectoryInfo 自动驾驶状态信息 - */ - @Synchronized - fun invokeAutopilotTrajectory(trajectoryInfo: MutableList) { - M_LISTENERS.forEach { - val tag = it.key - val listener = it.value - listener.onAutopilotTrajectory(trajectoryInfo) - } - } - - /** - * 路径规划 回调 - * @param globalPathResp 自动驾驶网约车回调数据 - */ - @Synchronized - fun invokeAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) { - M_LISTENERS.forEach { - val tag = it.key - val listener = it.value - listener.onAutopilotRotting(globalPathResp) - } - } - - -} \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningRottingListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningRottingListenerManager.kt new file mode 100644 index 0000000000..b3c1d7d43f --- /dev/null +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningRottingListenerManager.kt @@ -0,0 +1,27 @@ +package com.mogo.eagle.core.function.call.autopilot + +import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener +import com.mogo.eagle.core.function.call.base.CallerBase +import mogo.telematics.pad.MessagePad + +/** + * @author xiaoyuzhou + * @date 2023/1/5 5:48 下午 + * 工控机引导线数据 + */ +object CallerPlanningRottingListenerManager : CallerBase() { + + /** + * 路径规划 回调 + * @param globalPathResp 自动驾驶网约车回调数据 + */ + @Synchronized + fun invokeAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) { + M_LISTENERS.forEach { + val tag = it.key + val listener = it.value + listener.onAutopilotRotting(globalPathResp) + } + } + +} \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningTrajectoryListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningTrajectoryListenerManager.kt new file mode 100644 index 0000000000..febca6f0de --- /dev/null +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerPlanningTrajectoryListenerManager.kt @@ -0,0 +1,28 @@ +package com.mogo.eagle.core.function.call.autopilot + +import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningTrajectoryListener +import com.mogo.eagle.core.function.call.base.CallerBase +import mogo.telematics.pad.MessagePad + +/** + * @author xiaoyuzhou + * @date 2023/1/ 5:48 下午 + * 工控机引导线数据 + */ +object CallerPlanningTrajectoryListenerManager : CallerBase() { + + /** + * 车前引导线 回调 + * @param trajectoryInfo 自动驾驶状态信息 + */ + @Synchronized + fun invokeAutopilotTrajectory(trajectoryInfo: MutableList) { + + M_LISTENERS.forEach { + val tag = it.key + val listener = it.value + listener.onAutopilotTrajectory(trajectoryInfo) + } + } + +} \ No newline at end of file