This commit is contained in:
lixiaopeng
2022-03-02 17:03:52 +08:00
parent 009aaf5d0a
commit ce09c619b8
2 changed files with 10 additions and 15 deletions

View File

@@ -95,21 +95,6 @@ public class MoGoAdasListenerImpl implements OnAdasListener {
public void onCarStateData(CarStateInfo carStateInfo) {
if (HdMapBuildConfig.isMapLoaded) {
// Logger.d(TAG, "--------carStateInfo.toString() = " + carStateInfo.toString());
//can数据转发
CarStateInfo.ValuesBean bean = carStateInfo.getValues();
// Log.w("DHY-location", bean.getLon() + "," + bean.getLat() + " OnAdasListenerAdapter-onCarStateData");
if (bean != null) {
int turnLight = bean.getTurnLightOften(); //转向灯状态 0是正常 1是左转 2是右转
AmiClientManager.getInstance().setTurnLightState(turnLight);
int brakeLight = bean.getBrake_light(); //TODO
// Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight);
//设置转向灯
CallerHmiManager.INSTANCE.showTurnLight(turnLight);
//设置刹车信息
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight);
} else {
Logger.e(TAG, "bean == null ");
}
AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectConvertUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo);
// 将数据通过数据中心分发出去
CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);

View File

@@ -11,6 +11,8 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener;
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.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.module.common.drawer.IdentifyDataDrawer;
import com.zhidao.support.obu.ami.AmiClientManager;
@@ -52,6 +54,14 @@ public class MoGoHandAdasMsgManager implements
//转向灯状态 0是正常 1是左转 2是右转
int turnLight = bean.getTurn_light();
AmiClientManager.getInstance().setTurnLightState(turnLight);
int brakeLight = bean.getBrake_light();
// Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight);
//设置转向灯
CallerHmiManager.INSTANCE.showTurnLight(turnLight);
//设置刹车信息
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight);
} else {
Logger.e(TAG, "bean == null ");
}
}
}