2132 支持sop 云调度update
This commit is contained in:
@@ -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<Dispatch
|
||||
}
|
||||
|
||||
private void startAutoPilot() {
|
||||
AutopilotControlParameters currentAutopilot = new AutopilotControlParameters();
|
||||
currentAutopilot.isSpeakVoice = false;
|
||||
List<AutopilotControlParameters.AutoPilotLonLat> 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<AutopilotControlParameters.AutoPilotLonLat> 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
|
||||
|
||||
Reference in New Issue
Block a user