合并dev_MogoAP_eagle-930_210926_8.0.12分支,并将规划全局路径以及引导线按照新架构中的监听合并,测试可用,在工控机上执行sh roadPlanning.sh 使用带有引导线的数据包
Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
@@ -5,14 +5,13 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -21,7 +20,7 @@ import java.util.List;
|
||||
public class MoGoAutopilotStatusListenerImpl implements IMoGoAutopilotStatusListener {
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NonNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,10 +33,6 @@ public class MoGoAutopilotStatusListenerImpl implements IMoGoAutopilotStatusList
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRoute(@Nullable AutopilotRouteInfo autopilotRoute) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSNRequest() {
|
||||
@@ -50,7 +45,7 @@ public class MoGoAutopilotStatusListenerImpl implements IMoGoAutopilotStatusList
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotIdentifyDataUpdate(@Nullable List<TrafficData> trafficData) {
|
||||
public void onAutopilotIdentifyDataUpdate(@Nullable ArrayList<TrafficData> trafficData) {
|
||||
|
||||
}
|
||||
|
||||
@@ -58,4 +53,5 @@ public class MoGoAutopilotStatusListenerImpl implements IMoGoAutopilotStatusList
|
||||
public void onAutopilotWarnMessage(@Nullable AutopilotWarnMessage autopilotWarnMessage) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
@@ -24,12 +23,12 @@ import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
import com.mogo.utils.DeviceIdUtils
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import com.mogo.utils.network.utils.GsonUtil
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -185,10 +184,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotRoute(autopilotRoute: AutopilotRouteInfo?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotSNRequest() {
|
||||
|
||||
}
|
||||
@@ -197,7 +192,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: List<TrafficData>?) {
|
||||
override fun onAutopilotIdentifyDataUpdate(trafficData: ArrayList<TrafficData>?) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
|
||||
@@ -64,6 +64,7 @@ dependencies {
|
||||
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,14 +10,18 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.adas.IMogoAdasRouteCallBack;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -25,7 +29,7 @@ import java.util.List;
|
||||
* @date 12/10/20 1:34 PM
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_SMALL_MAP)
|
||||
public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChangedListener, IMogoAdasRouteCallBack {
|
||||
public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChangedListener, IMoGoAutopilotPlanningListener {
|
||||
private final String TAG = "SmallMapProvider";
|
||||
|
||||
private Context mContext;
|
||||
@@ -40,7 +44,7 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
mActivity = activity;
|
||||
mContainerId = containerId;
|
||||
SmpServiceManager.init(mActivity);
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().addAdasAutopilotRouteCallBack(this);
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +89,7 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
Log.d(TAG, "准备show fragment");
|
||||
mActivity.getSupportFragmentManager().beginTransaction().show(mSmallMapFragment).commitAllowingStateLoss();
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG, "add fragment 失败 ======"+e.getMessage());
|
||||
Log.d(TAG, "add fragment 失败 ======" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -130,15 +134,6 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void routeResult(List<MogoLatLng> routeList) {
|
||||
Log.e("lianglihui","SmallMapProvider");
|
||||
if (routeList != null && routeList.size() > 0) {
|
||||
drawablePolyline(routeList);
|
||||
} else {
|
||||
clearPolyline();
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -154,6 +149,28 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(ArrayList<ADASTrajectoryInfo> trajectoryInfos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(AutopilotRouteInfo routeList) {
|
||||
if (routeList.getModels() == null || routeList.getModels().size() == 0) {
|
||||
return;
|
||||
}
|
||||
List<MogoLatLng> latLngList = new ArrayList<>();
|
||||
for (AutopilotRouteInfo.RouteModels routeModel : routeList.getModels()) {
|
||||
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
|
||||
}
|
||||
Log.e(TAG, "routeResult:" + latLngList.size());
|
||||
if (latLngList.size() > 0) {
|
||||
drawablePolyline(latLngList);
|
||||
} else {
|
||||
clearPolyline();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user