rebase
This commit is contained in:
@@ -297,10 +297,6 @@ public class MockIntentHandler implements IntentHandler {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController()
|
||||
.rtkEnable(false);
|
||||
break;
|
||||
case 39:// 使用自动驾驶车的定位数据
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController()
|
||||
.syncLocation2Map(null);
|
||||
break;
|
||||
case 40:
|
||||
double[][] coors = new double[][]{{40.17511749267578, 116.74359130859375},
|
||||
{40.20258331298828, 116.74071502685547},
|
||||
@@ -789,9 +785,9 @@ public class MockIntentHandler implements IntentHandler {
|
||||
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawIdentifyData) {
|
||||
ThreadUtils.getSinglePool().execute(() ->
|
||||
IdentifyDataDrawer.getInstance().renderAdasRecognizedResult(trafficData)
|
||||
);
|
||||
// ThreadUtils.getSinglePool().execute(() ->
|
||||
// IdentifyDataDrawer.getInstance().renderAdasRecognizedResult(trafficData)
|
||||
// );
|
||||
} else {
|
||||
IdentifyDataDrawer.getInstance().clearOldMarker();
|
||||
}
|
||||
@@ -825,9 +821,9 @@ public class MockIntentHandler implements IntentHandler {
|
||||
|
||||
try {
|
||||
if (FunctionBuildConfig.isDrawIdentifyData) {
|
||||
ThreadUtils.getSinglePool().execute(() ->
|
||||
IdentifyDataDrawer.getInstance().renderAdasRecognizedResult(trafficData)
|
||||
);
|
||||
// ThreadUtils.getSinglePool().execute(() ->
|
||||
// IdentifyDataDrawer.getInstance().renderAdasRecognizedResult(trafficData)
|
||||
// );
|
||||
} else {
|
||||
IdentifyDataDrawer.getInstance().clearOldMarker();
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@ import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
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.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
@@ -18,7 +15,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.module.common.utils.DrivingDirectionUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -27,6 +23,9 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
public class MogoRouteOverlayManager implements
|
||||
IMoGoAutopilotPlanningListener, IMoGoAutopilotStatusListener,
|
||||
IMoGoMapLocationListener {
|
||||
@@ -102,13 +101,13 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(AutopilotRouteInfo routeList) {
|
||||
if (routeList.getModels() == null || routeList.getModels().size() == 0) {
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) {
|
||||
if (globalPathResp == null || globalPathResp.getWayPointsList().size() == 0) {
|
||||
return;
|
||||
}
|
||||
List<MogoLatLng> latLngList = new ArrayList<>();
|
||||
for (AutopilotRouteInfo.RouteModels routeModel : routeList.getModels()) {
|
||||
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
|
||||
for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) {
|
||||
latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude()));
|
||||
}
|
||||
int listSize = latLngList.size();
|
||||
mEnding = latLngList.get(listSize - 1);
|
||||
@@ -120,7 +119,7 @@ public class MogoRouteOverlayManager implements
|
||||
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData) {
|
||||
return;
|
||||
}
|
||||
this.STATUS_AUTOPILOT = autoPilotStatusInfo.getControl_pilotmode();
|
||||
this.STATUS_AUTOPILOT = autoPilotStatusInfo.getPilotmode();
|
||||
//Log.d("lianglihui","onAutopilotStatusResponse:"+STATUS_AUTOPILOT);
|
||||
// if (STATUS_AUTOPILOT == 1 ){
|
||||
// if (mEnding != null){
|
||||
@@ -128,7 +127,7 @@ public class MogoRouteOverlayManager implements
|
||||
// }
|
||||
// }else {
|
||||
//
|
||||
// }我
|
||||
// }
|
||||
if (STATUS_AUTOPILOT != 1) {
|
||||
RouteOverlayDrawer.getInstance(mContext).clearEndingMarker();
|
||||
RouteOverlayDrawer.getInstance(mContext).clearMogoRouteOverlay();
|
||||
@@ -136,20 +135,16 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
|
||||
public void onAutopilotArriveAtStation(MessagePad.ArrivalNotification arrivalNotification) {
|
||||
|
||||
if (autopilotWayArrive == null) {
|
||||
if (arrivalNotification == null) {
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
Logger.d(TAG, "onArriveAt data : " + arrivalNotification.toString());
|
||||
// //演示模式下 到达终点将忽略 引导线绘制 选项关闭
|
||||
// FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(@Nullable AutopilotGuardianStatusInfo guardianInfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotSNRequest() {
|
||||
@@ -157,7 +152,7 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location) { //todo 拖尾
|
||||
public void onLocationChanged(@Nullable MogoLocation location) {
|
||||
// mLocation = location;
|
||||
// if (mTrajectoryList.isEmpty()) {
|
||||
// return;
|
||||
@@ -184,18 +179,18 @@ public class MogoRouteOverlayManager implements
|
||||
|
||||
mLocation = location;
|
||||
List<MogoLatLng> temp = mTrajectoryList;
|
||||
if (temp.isEmpty()){
|
||||
if (temp.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// Log.e(TAG, "onLocationChanged: size = "+ mTrajectoryList.size()+" ----- "+mLocation.getLongitude()+"-"+mLocation.getLatitude());
|
||||
ArrayList list = new ArrayList();
|
||||
for (MogoLatLng latLng:temp) {
|
||||
ArrayList list = new ArrayList();
|
||||
for (MogoLatLng latLng : temp) {
|
||||
// if(!isPointOnCarFront(mLocation,latLng)){
|
||||
list.add(latLng);
|
||||
list.add(latLng);
|
||||
// }
|
||||
}
|
||||
Log.d(TAG,"TrajectoryData = " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + "---status = " + STATUS_AUTOPILOT + "----size = " + list.size());
|
||||
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData || STATUS_AUTOPILOT == 1){
|
||||
Log.d(TAG, "TrajectoryData = " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + "---status = " + STATUS_AUTOPILOT + "----size = " + list.size());
|
||||
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData || STATUS_AUTOPILOT == 1) {
|
||||
RouteOverlayDrawer.getInstance(mContext).drawTrajectoryList(list);
|
||||
}
|
||||
}
|
||||
@@ -218,4 +213,9 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user