Merge remote-tracking branch 'origin/dev_MogoAP_eagle-1030_211020_8.0.14' into dev_MogoAP_eagle-1030_211020_8.0.14
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.module.adas;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
|
||||
@@ -9,12 +10,14 @@ 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.constants.MoGoConfig;
|
||||
import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotRoute;
|
||||
@@ -42,22 +45,28 @@ import java.util.List;
|
||||
public class OnAdasListenerAdapter implements OnAdasListener {
|
||||
private final String TAG = "OnAdasListenerAdapter";
|
||||
|
||||
|
||||
@Override
|
||||
public void onRectData(RectInfo rectInfo) {
|
||||
ArrayList<TrafficData> recognizedListResults = AdasObjectUtils.INSTANCE.regroupTrafficDataData(rectInfo.getModels());
|
||||
CallerAutopilotIdentifyListenerManager.INSTANCE.invokeAutopilotIdentifyDataUpdate(recognizedListResults);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCarStateData(CarStateInfo carStateInfo) {
|
||||
Logger.d(TAG, "----1----carStateInfo.toString() = " + carStateInfo.toString());
|
||||
AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo);
|
||||
CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);
|
||||
|
||||
Logger.d(TAG, "----2----carStateInfo.toString() = " + carStateInfo.toString());
|
||||
//can数据转发
|
||||
CarStateInfo.ValuesBean bean = carStateInfo.getValues();
|
||||
if (bean != null) {
|
||||
int turn_light = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转
|
||||
Logger.d(TAG, "onCarStateData ---- turn_light = " + turn_light);
|
||||
AmiClientManager.getInstance().setTurnLightState(turn_light);
|
||||
} else {
|
||||
Logger.e(TAG, "bean == null ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class MogoRouteOverlayManager implements IMogoCarLocationChangedListener2
|
||||
private static volatile MogoRouteOverlayManager sInstance;
|
||||
private Context mContext;
|
||||
private String TAG = "MogoRouteOverlayManager";
|
||||
|
||||
private int STATUS_AUTOPILOT = STATUS_AUTOPILOT_DISABLE;
|
||||
private MogoRouteOverlayManager(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
@@ -98,7 +98,9 @@ public class MogoRouteOverlayManager implements IMogoCarLocationChangedListener2
|
||||
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
|
||||
}
|
||||
Log.e(TAG, "routeResult:" + latLngList.size());
|
||||
RouteOverlayDrawer.getInstance(mContext).putRouteList(latLngList);
|
||||
if (STATUS_AUTOPILOT == IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING) {
|
||||
RouteOverlayDrawer.getInstance(mContext).putRouteList(latLngList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -108,7 +110,7 @@ public class MogoRouteOverlayManager implements IMogoCarLocationChangedListener2
|
||||
|
||||
@Override
|
||||
public void onStateChanged(int state, String reason) {
|
||||
// this.STATUS_AUTOPILOT = state;
|
||||
this.STATUS_AUTOPILOT = state;
|
||||
if (state != IMogoAdasOCHCallback.STATUS_AUTOPILOT_RUNNING) {
|
||||
RouteOverlayDrawer.getInstance(mContext).clearMogoRouteOverlay();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user