From 52f4e9be58eae97bf187ae81c5110723683fb162 Mon Sep 17 00:00:00 2001 From: lianglihui Date: Fri, 13 Jan 2023 18:47:23 +0800 Subject: [PATCH] =?UTF-8?q?2132=20=E6=94=AF=E6=8C=81sop=20=E4=BA=91?= =?UTF-8?q?=E8=B0=83=E5=BA=A6update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dispatch/DispatchAutoPilotManager.java | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java b/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java index bd8b98e7ac..72a42c653c 100644 --- a/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java +++ b/core/function-impl/mogo-core-function-dispatch/src/main/java/com/zhjt/dispatch/DispatchAutoPilotManager.java @@ -33,6 +33,7 @@ import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS; import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DISPATCH; import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_AFFIRM; import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_MANUAL_CANCEL; @@ -161,20 +162,27 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener wayLatLon = new ArrayList<>(); - if (receiverBean != null && receiverBean.getStopsList() != null) { - for (MogoLatLng mogoLatLng : receiverBean.getStopsList()) { - wayLatLon.add(new AutopilotControlParameters.AutoPilotLonLat(mogoLatLng.lat, mogoLatLng.lon)); +// AutopilotControlParameters currentAutopilot = new AutopilotControlParameters(); +// currentAutopilot.isSpeakVoice = false; +// List wayLatLon = new ArrayList<>(); +// if (receiverBean != null && receiverBean.getStopsList() != null) { +// for (MogoLatLng mogoLatLng : receiverBean.getStopsList()) { +// wayLatLon.add(new AutopilotControlParameters.AutoPilotLonLat(mogoLatLng.lat, mogoLatLng.lon)); +// } +// } +// currentAutopilot.wayLatLons = wayLatLon; +// currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon()); +// currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon()); +// currentAutopilot.vehicleType = 10; +// CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "开启自动驾驶====" + currentAutopilot); +// CallerAutoPilotManager.INSTANCE.startAutoPilot(currentAutopilot); + AutopilotStatusInfo autopilotStatusInfo = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo(); + if (autopilotStatusInfo !=null){ + AutopilotControlParameters autopilotControlParameters = autopilotStatusInfo.getAutopilotControlParameters(); + if (autopilotControlParameters != null){ + CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()); } } - currentAutopilot.wayLatLons = wayLatLon; - currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon()); - currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon()); - currentAutopilot.vehicleType = 10; - CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "开启自动驾驶====" + currentAutopilot); - CallerAutoPilotManager.INSTANCE.startAutoPilot(currentAutopilot); } @Override