配合修改收不到can数据问题
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 ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user